Directory for shell scripts
I'm looking for a logical place to save Unix shell scripts. ~/Documents doesn't sound right, nor would ~/bin because the scripts aren't binaries. I know it comes down to personal preference, but what makes the most sense, ~/Library/Scripts? and /Library/Scripts for all users?
I've been using Unix since '85, and here is what I do:
~/local/bin # for my personal scripts and executables
/usr/local/bin # for my shared scripts and executables
And I also create a symlink ~/bin that points to ~/local/bin
cd ~
ln -s local/bin bin
Many open source applications are stored by default in /usr/local/bin, but from time to time, I'm on a Unix system I do not own, and I want to install a personal open source program, so I use
./configure --prefix=$HOME/local
which will configure the open source software so it is setup to store things in my home directory, including any support files, man files etc... associated with the program. For example a personal copy of Vim.
Similar Messages
-
Automator: current directory in shell script not accepted
Hi!
I wrote a bash script requiring first the directory where the script is.
#!/bin/bash
cd "`dirname \"$0\"`"
convert *_A.jpg *_N21.jpg *_I3.jpg -background black -compose screen -flatten merge.jpg
exit
The script runs fine itself. I want to integrate this as an Automator's service, right-clicking on random image and starting the script in THAT directory.
Unfortunately, cd "`dirname \"$0\"`" doesn't seem to work when built in automator and Home directory is always default.
I also tried in automator with this http://img84.imageshack.us/img84/9317/schermata20100605a00251.png (sorry it's italian,below a translation)
Folders in Finder
1)Obtain specified items from Finder: Path
2)Shell script
#!/bin/bash
cd $@
convert *_A.jpg *_N21.jpg *_I3.jpg -background black -compose screen -flatten merge.jpg
exit
and fails too.
All solutions will be appreciated
Thanks
StefanoTry the Unix forum under OS X Technologies for bash scripting and these for automator stuff:
http://www.macosxautomation.com/
Introduction to Automator tutorial at http://automator.us/leopard/video/index.html
http://www.automatedworkflows.com/tips/podcast.html and
http://www.macosxautomation.com/automator/examples/ex04/index.html
and finally the Automator forum under OS X Leopard. -
Moving files into directory using shell script
Can someone tell me how I move files into directory using *nix/linux shell script?
I have files which created from stored procedures using utl_file. The files name for example:
DKH_104_12345
DKE_101_42324242
DKH_102_32432
DKE_101_34553
Then I create directories automatically for example:
/oradata/apps/dmp/output/101
/oradata/apps/dmp/output/102
/oradata/apps/dmp/output/103
/oradata/apps/dmp/output/104
Using this procedure :
CREATE OR REPLACE PROCEDURE Xorganize AS
v_item VARCHAR2(5);
v_DirName VARCHAR2(50);
v_FileName VARCHAR2(50):='xorganize';
v_FileExt VARCHAR2(5):='.sh';
v_ID UTL_FILE.file_type;
CURSOR res IS
--find the directory name from table
SELECT brn_cde FROM vcr_brn_cde ORDER BY 1;
BEGIN
--used by utl.file funtion
SELECT PRD_DIR INTO v_DirName
FROM CR_SYS_PRM
WHERE CLT_CDE ='FIF';
SELECT v_FileName||v_FileExt INTO v_FileName FROM dual;
v_ID:=UTL_FILE.FOPEN(v_DirName,v_FileName, 'w');
utl_file.PUTF(v_ID,'%s\n','@@echo OFF');
utl_file.PUTF(v_ID,'%s\n','cls');
utl_file.PUTF(v_ID,'%s\n','echo Reorganizing ...');
OPEN res;
LOOP
FETCH res INTO v_item;
EXIT WHEN res%NOTFOUND;
utl_file.PUTF(v_ID,'%s\n','mkdir '||v_item);
END LOOP;
CLOSE res;
OPEN res;
LOOP
FETCH res INTO v_item;
EXIT WHEN res%NOTFOUND;
utl_file.PUTF(v_ID,'%s\n','move _'||v_item||'_.* '||v_item||'\');
END LOOP;
CLOSE res;
utl_file.PUTF(v_ID,'%s\n','FOR /F "usebackq delims=" %%1 IN (`dir /b *.`) DO @rd/q %%1');
utl_file.PUTF(v_ID,'%s\n','cls');
utl_file.PUTF(v_ID,'%s\n','echo Reorganizing ...Done');
utl_file.fclose(v_ID);
END;
Everything works fine, BUT, the script is generated in dos/windows scripting.
Now I need to run the script in *nix/linux shell, which I still can’t do it (because of my knowledge :p).
And also I don’t know if the script already generated in *nix/linux shell version, how do I chmod +x the script from stored procedure, I can’t use ‘host’ command in my tools
Thanks a lot
-firmanIf you're using 9i then UTL_FILE.FRENAME() will execute something like a Unix mv command.
If you want to do a chmod then you'll need to check out how to use a Java Stored Procedure to execute OS calls.
Cheers, APC -
Cd not changing directory in shell script
This shell script executes correctly, but... not correctly:
#!/bin/bash
cd /var/www/vhosts/mydomain.com/httpdocs
pwd
Output is:
/var/www/vhosts/mydomain.com/httpdocs
[root bin]#
However, when I immediately type "pwd", it returns
/usr/bin
How can pwd in the script return a path different from the path I am in?[Running a script launches a subshell|http://tldp.org/LDP/abs/html/subshells.html], and the subshell does change the default, and that default promptly evaporates when the subshell exits.
You can invoke the script as dot-space-scriptname or as +source script+ to avoid the subshell.
. ~/script
source ~/script
Or you can switch tactics and use a bash function:
function cdhttpdocs() {
cd /var/www/vhosts/mydomain.com/httpdocs
The easiest for this case is probably something akin to an alias:
alias cdhttpdocs="cd /var/www/vhosts/mydomain.com/httpdocs" -
Substitute for shell scripts in windows?
In linux, I believe shell scripts would be useful for simulating user load on oracle. But in windows what could serve that purpose? Dos?
In windows it's called batch file scripting
run these script in cmd mode. similiar to a DOS screen
type cmd at Start--> Run
http://labmice.techtarget.com/articles/batchcmds.htm -
Parameters for Shell Script running through DBMS_SCHEDULER as Executable
Hi,
I'm using Oracle 10.2.0.1 on Solaris.
I have a shell script to run through DBMS_SCHEDULER.
DBMS_SCHEDULER.CREATE_PROGRAM (
program_name => 'PROGRAM_NAME',
program_type => 'EXECUTABLE',
program_action => '/home/oracle/test.sh',
enabled => TRUE,
comments => 'Test Shell Script'
But how do I define the parameters for the shell script?
Lets say if I run the shell script from the Unix promt I will enter as below:
/home/oracle/test.sh PITS aed5 XYZ
How do I define it in the DBMS_SCHEDULER.define_program_argument?
Thanks,
ShailWhen you create the program you define the number of parameters it will accept:
DBMS_SCHEDULER.CREATE_PROGRAM (
program_name => 'PROGRAM_NAME',
program_type => 'EXECUTABLE',
program_action => '/home/oracle/test.sh',
enabled => TRUE,
comments => 'Test Shell Script',
number_of_arguments => 3
);then you define your job arguments and set default values. This is optional - but if you don't then you will have to define the values using the set_job_argument_value:
-- defines the first argument
DBMS_SCHEDULER.DEFINE_PROGRAM_ARGUMENT(
program_name => 'PROGRAM_NAME',
argument_position => 1,
argument_name => 'arg1',
argument_type 'CHAR',
default_value => 'PITS',
);You can set the argument vaues using:
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
job_name => 'JOB1',
argument_position => 1,
argument_value => 'PITS');or using the argument name defined using the define_program argument
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
job_name => 'JOB1',
argument_name => 'arg1',
argument_value => 'PITS');where JOB1 is a job for program PROGRAM_NAME created using the dbms_scheduler.create_job procedure
see docmentation: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm for more details... -
Parameters for Shell Script running DBMS_SCHEDULER as Executable
Hi,
I have a shell script to run through DBMS_SCHEDULER.
DBMS_SCHEDULER.CREATE_PROGRAM (
program_name => 'PROGRAM_NAME',
program_type => 'EXECUTABLE',
program_action => '/home/oracle/test.sh',
enabled => TRUE,
comments => 'Test Shell Script'
But how do I define the parameters for the shell script?
Lets say if I run the shell script from the Unix promt I will enter as below:
/home/oracle/test.sh -d aed5 -p "XYZ"
How do I define it in the DBMS_SCHEDULER.define_program_argument?
Thanks in advance,
Samujjwal BasuRe: Excute Unix command Using PL SQL might help.
-
[SORRY] exec command problem for shell scripting
I know this is not an appropriate place to ask questions about shell programming, but I have tried many other places... and no helpful help yet. So, here I am.
I am writing a simple shell script that would actually execute a java application. However, I want to give the users the option of running it in background. So,
COMMAND="java blahblah"
DAEMON="&"
exec "$COMMAND $DAEMON"
But, when I run it, it spits out an error message saying something like "Invalid agrument: &".
Is there a way to exec'ing "java blahblah &" using variables as arguments to "exec" command???
OR is it even NOT possible?
This problem seems so trivial, but took a man out of me. :( Please help.
thanks
yosepexecute a java application. However, I want to give
the users the option of running it in background. It doesn't generally make sense to exec an ansynchronous process, and one can introduce varying errors in this method. Just simply drop the exec. The java process will async off and the shell script will exit leaving no shell process running. Simple as that.
BTW, you generally exec a java process if you wish to replace the shell with the java process, but then the async request is given at the caller, she who actually calls the script (genarally from an interactive shell). -
Default directory for sql script in iSqlplus 10g
I want to run an sql file from the url as "http://machine_name.domain:5560/isqlplus/dynamic?script=http://machine_name2.domain/myscript.sql
". What is the default directory to place the file myscript.sql in? Do I need to create a DAD for specifying a different directory?
Am using Oracle 10g.
ANHi Alison,
I tried putting the sql script on different directories on the Oracle server but the url doesnt seem to find the script at all. It gives an error "Cannot find sql script".
I have not installed Oracle Application server 10g yet. Am only running Oracle Database 10g with iSqlplus and PL/SQL.
AN -
Where is the Shell Script directory?
I have been asked to run a script in the Shell Script directory.
I found the directory /library/scripts ... when I ran the script in there I did not get the expected results, so I assume the directory is incorrect.
Please help..AFAIK, that folder's for AppleScripts, not shell scripts. For shell scripting, see https://developer.apple.com/library/mac/#documentation/OpenSource/Conceptual/She llScripting/Introduction/Introduction.html
-
How to parse a text file and produce a dynamic shell script for linking?
I have some mapping files, one example is like this one;
$ cat CON_xfrm_contract_to_20080302.map
(object mfile_c_type
(path "file:OBSOLETE")
(fs "file://amanos/s01/abinitio/data/prod/mfs/mfs_16way")
(local_paths 16
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_002/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_003/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_004/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_005/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_006/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_007/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_008/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_009/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_010/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_011/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_012/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_013/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_014/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_015/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"
"file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat"))In this file's content I have some exracted text files with same names under different folders;
$ ls -lt /s01/abinitio/data/prod/mfs/parts/mfs_16way_*/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat [
-rw-rw-rw- 1 ab_live abinitio 438652105 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_010/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438490410 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438219252 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_007/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438521432 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_014/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438488130 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_003/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438249547 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_002/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438312177 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_012/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 439074566 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_015/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438722261 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_004/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438742477 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438517268 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_008/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438645835 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_011/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438334994 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_006/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438470743 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_005/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438095853 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_009/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
-rw-rw-rw- 1 ab_live abinitio 438434204 Mar 3 01:42 /s01/abinitio/data/prod/mfs/parts/mfs_16way_013/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.datI need a shell script which will produce a shell script from the content of the mapping file so that I can be able to symbolicly link these files with different names and under the same folder, like;
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat ./mfs_16way_001.CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat ./mfs_16way_016.CON_xfrm_contract_to_20080302.datI am a newbie for shell scripting, I tried several awk and sed operations but couldn't get close to this output :(
If you guide me I will be so glad, thank you.
ps: amanos is the name of this server.this is thepoint that I am stuck, I can not add the destination sym.link name to the end of each line;
$ grep " \"file://amanos" CON_xfrm_contract_to_20080302.map | cut -c17- | sed 's/"//;s/)//g' | sed 's/\/s01/ln -s \/s01/g'
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_002/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_003/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_004/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_005/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_006/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_007/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_008/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_009/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_010/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_011/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_012/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_013/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_014/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_015/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
ln -s /s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_contract_to_20080302.dat
$ /)//g' | sed 's/\/s01/ln -s \/s01/g' | awk -F\/ '{print $8"."$14}' <
mfs_16way_001.CON_xfrm_contract_to_20080302.dat
mfs_16way_002.CON_xfrm_contract_to_20080302.dat
mfs_16way_003.CON_xfrm_contract_to_20080302.dat
mfs_16way_004.CON_xfrm_contract_to_20080302.dat
mfs_16way_005.CON_xfrm_contract_to_20080302.dat
mfs_16way_006.CON_xfrm_contract_to_20080302.dat
mfs_16way_007.CON_xfrm_contract_to_20080302.dat
mfs_16way_008.CON_xfrm_contract_to_20080302.dat
mfs_16way_009.CON_xfrm_contract_to_20080302.dat
mfs_16way_010.CON_xfrm_contract_to_20080302.dat
mfs_16way_011.CON_xfrm_contract_to_20080302.dat
mfs_16way_012.CON_xfrm_contract_to_20080302.dat
mfs_16way_013.CON_xfrm_contract_to_20080302.dat
mfs_16way_014.CON_xfrm_contract_to_20080302.dat
mfs_16way_015.CON_xfrm_contract_to_20080302.dat
mfs_16way_016.CON_xfrm_contract_to_20080302.datMessage was edited by:
antu
Message was edited by:
antu -
Shell script for archive log transfer
hi
I dont want to reinvent the wheel.
I am looking for shell script for log shipping to provide standby db.
What I want to do is, get the last applied archived log number from alert.log
Copy the files from archive destination according to this value.
CheersIf you don't want to re-invent the wheel you use Dataguard, no scripts.
And your script should use the dictionary, instead of some bs method to read the alert.
v$archived_log has all information!
Also as far as I know, the documentation describes manual standby.
So apparently you not only don't want to reinvent the wheel, but you want the script on a silver plate on your doorstep!
Typical attitude of most DBAs here. Use OTN for a permanent vacation.
Sybrand Bakker
Senior Oracle DBA -
Shell Scripts for installation / migration of an object
Hi All,
We are on Oracle Applications R12 and we are settling down with it. Our database and app servers are on Linux. To migrate objects from one instance to another or to install objects, we use two different approaches. One is to move objects manually using the installation instructions (MD120) and another to use Shell script. Now we need to choose any of these two approaches. But we are not able to decide. Appreciate if you can help me answering following questions. This will help us greatly in finalizing the process. I am for Shell Script. But if I get proper arguments / reasons, I am not against it.
1. Who should be responsible for moving or migrating objects? Is it DBAs? If not, who? At our place, DBAs are performing this task.
2. Our DBAs have argument that if they move it using script, there will be a big control issue over what is moving in to database / app server. (Our DBA does not have any prior experience of managing Oracle Applications instance. He used to be a Oracle DBA for Peoplesoft)
3. If we have some side by side comparison or link to that, that will be perfect.
4. If someone has a case study and / or the industry best practices document on it, please share it with me. My email id is [email protected]
Earlier I have worked only in consulting companies where only Shell script was the standard and best practice. This is my first end user company.
Appreciate help and thank you in advance.
CAHHi,
1. Who should be responsible for moving or migrating objects? Is it DBAs? If not, who? At our place, DBAs are performing this task.The DBA.
2. Our DBAs have argument that if they move it using script, there will be a big control issue over what is moving in to database / app server. (Our DBA does not have any prior experience of managing Oracle Applications instance. He used to be a Oracle DBA for Peoplesoft)Both approach would work. Personally, I prefer the script approach and the DBA can review the code before running any script.
3. If we have some side by side comparison or link to that, that will be perfect. I do not think such a link exist.
Thanks,
Hussein -
Shell scripting for oracle DBs
looking for good source for shell scripting for oracle DBs
Just buy 'Classic Shell Scripting' and 'the Unix Desktop Reference' both published by O'Reilly and you have it all.
But if you want a platform agnostic scripting language use Perl. Comes with Oracle.
However both bash and kornshell are a lot easier compared to Perl.
Sybrand Bakker
Senior Oracle DBA -
I have a file with passwd format.I made a script for this file that is working as I wanted it to work.I have a list of options and each time I give an option,the script is doing something(for example,if I press "b" it makes something and if I press "a" it makes something else).All the results are an output from the file.
My question is how can I create a GUI in java for this script.For example if I want the script to do what it would do if I pressed the "a" button on my keyboard,but not by pressing "a",but by choosing from a drop down list or some other graphical feature(by ticking a check box,clicking a button etc).Can I do this with java?
LazarosHi,
I understand you can create a Java Swing gui for a bash shell script which takes both complex input and writes output to the stdout & files, to be specific. Is that correct?
If yes, could you give a simple example. Say for the following shell script.
#!/bin/sh
printf "Enter input\n"
i=0
while [ $i -ne 1 ]; do
read $inputVar
if [ "$inputVar" == "y" ]; then
printf "You typed yes\n"
i=1
elif [ "$inputVar" == "y" ]; then
printf "you typed no\n"
i=1
else
printf "Enter a valid character\n"
i=0
fi
done
Could you also point to some URL's which might help? Googling for "Java Gui for shell script" returns this as the first page, others dont really help. Googling "GUI for shell script" returns all other gui toolkits for xes but thats not what I want. I want a cross platform (nixes, Win*, MacOS* ) gui for a shell script ( which I plan to run using cygwin etc).
TIA
Vinod
Maybe you are looking for
-
Schedule line generation through MRP
hi, Schedule lines are not generated through MRP. i Have Maintained all settings.standard PR is creating while running MRP.the SA account assignment category is Q(Project-make to order). is this is the reason for Not geneating Schedule lines? what ne
-
Is there a way to create multiple BQY output to one of the Job File ?
Hello, I am using EPM11.1.2.3.501 version. BQY report due to the large amount of data, it is difficult to use a WebClient. So will share on a quarterly basis. However, If modifications are to occur,There are difficulties must modify each file. For ex
-
hi, I noticed this part of code to retrieve session scoped beans/vars in an ActionListener or other jsf classes, but it does not work for request scoped beans/vars :( what's the problem then ? what shall i do ? Type var = (Type)Util.getValueBinding("
-
help what do i do my i tunes wont open on either my laptop or my home computer laptop says error 7 windows 1114 computer says error 7 windows 126 what do i do?
-
Not sure if this is the right board to post this query.. Just updated my OS and not able to see facebook in my hub.. no notifications and not able to compose messages either. How do I get it back? Thanks.