10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have created a script for our automated DB creation, it works fine with default option(-d).
$ ./test_db.ksh -d abc 11 dev
-d is Default option
For creating a customized DB, i thought of giving the user different options.... (8 Replies)
Discussion started by: veeresh_15
2. Shell Programming and Scripting
I have a huge file semicolon( ; ) separated records are Pipe(|) delimited.
I need to replace the 50th field(semicolon separated) of each record with 9006. The 50th field can have no value e.g. ;;
Can someone help me with the appropriate command. (3 Replies)
Discussion started by: Gurkamal83
3. Shell Programming and Scripting
How can I say one of the options is required? can I use an if statement?
while getopts ":c:u:fp" opt; do
case $opt in
c) echo "-c was triggered, Parameter: $OPTARG" >&2;;
u) echo "-u was triggered, Parameter: $OPTARG" >&2;;
f) echo "-u was triggered,... (2 Replies)
Discussion started by: bashily
4. Shell Programming and Scripting
I have shell script as below in a.ksh.
while getopts a: b: ab:f: VAR
case $VAR in
echo $AB ;;
echo $F ;;
When I execute sh a.ksh -a 1 -b 2 -ab 3 -f 4 as below... (7 Replies)
Discussion started by: tonsat
5. Shell Programming and Scripting
I have been doing automation of daily check activity for a server, i have been using sqls to retrive the data and while loop for reading the data from the file for several activities. BUT i got a show stopper the below one.. where the data is getting store in $temp_file, but not being read by while... (1 Reply)
Discussion started by: KuldeepSinghTCS
6. Shell Programming and Scripting
I am new to the world of shell scripting
I wanted to extract two columns from multiple files say around 25 files
and i wanted to get the separate outfile for each input file
tired using the following command to extract two columns from 25 files
awk... (2 Replies)
Discussion started by: hema dhevi
7. UNIX for Dummies Questions & Answers
I have a requirement here where I am dealing with a dynamic file. Each record in the file can contain anywhere between 1(min) to 42(max) Reject codes. For example I may have one record in the file having 3 reject codes and another record having 5 reject codes. The reject codes will be... (2 Replies)
Discussion started by: sujainarayan
8. Shell Programming and Scripting
Is there any way to achieve following using perl program (i.e without using system command).
1.system ("echo 'test' > /usr/spool/ship.csv");
2.system ("cat /usr/ajay_test* >> /usr/spool/RAM/work/patil.csv");
for system("rm -f... (1 Reply)
Discussion started by: ajaypatil_am
9. UNIX for Dummies Questions & Answers
Hi, I'm having problems with a script where I wanted every single option specified in the command line to have an argument taken with it, but for some reason only d works in the code I will be showing below.
For example if I did ./thisfile -a something
it would come up with "a chosen with " as... (2 Replies)
Discussion started by: IceX
10. UNIX for Dummies Questions & Answers
I want to read a file in UNIX line by line.
Can u suggest me any command for this? (4 Replies)
Discussion started by: VENC22