10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Experts,
Need your guidance for case statement. I tried many way but no success yet.Now my existing code is doing something like below. Each Line of the input file contains one test case.#!/bin/bash
FILE=$1
while read LINE; do
do COMMAND
done < $FILE
Now I want to modify the code... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies
2. Shell Programming and Scripting
Hello!
Below my first bash script. As you can see i build 2 nested cases. The second one (sync databases) is working fine. Bu the first one (sync datadirs) is not working. It says: rsync: command not found. However when i move the rsync command to the top of the script its working. So i suppose... (2 Replies)
Discussion started by: hyperconnected
2 Replies
3. Shell Programming and Scripting
Hi ALL,
I am receving a "strange" error using a nested if within an sql operation inside:
./dom.ksh: syntax error at line 80 : `then' unmatched
This is all my script code: in bold the step receiving the error.
Any help would really aprrecieted ......!
**** I have tried all the... (2 Replies)
Discussion started by: AndreaCecco
2 Replies
4. Shell Programming and Scripting
Hi there,
I have nested case in my script. I am asking user, want to continue? if user press y/Y then my inner case should continue, rather than that my code start from beginning. I would like to continue my inner case until user press n or N. Is any one tell me how can I do?
Thanking You,... (2 Replies)
Discussion started by: kasparov
2 Replies
5. Red Hat
Hello,
I need to repack a file inside several java archives (nested .jar files) with or without overwrite.
I am using a manual approach with mc, but it's painfully slow progress.
For example I want to refresh a file deep inside a java archive (with nested .jar files):
I have a java... (0 Replies)
Discussion started by: Laurentiu
0 Replies
6. Shell Programming and Scripting
I'm trying to write case statements with 'if statements' embedded inside of them. I'm using the korn shell but it's not functioning.
If I want to see if a string exists in a file and then perform an action, what would be the best way to do this?
For file "asg51fin" to delete a line if a... (1 Reply)
Discussion started by: dazeman27
1 Replies
7. Shell Programming and Scripting
I have a question about nested double quotes. Any help is appreciated.
Here are my commands on Mac OS.
# string="Ethernet \"USB Ethernet\" \"Bluetooth DUN\" AirPort FireWire \"Bluetooth PAN\""
# echo $string
Ethernet "USB Ethernet" "Bluetooth DUN" AirPort FireWire "Bluetooth PAN"
#... (3 Replies)
Discussion started by: lindazhou
3 Replies
8. Shell Programming and Scripting
Im new to unix and shell scripting. I am required to write a program and im in the process of creating a menu system. I have my main menu but i want to be able to select an option that takes me onto another menu. I have tried doing this with the case statement with no luck so far. Wondering if it... (3 Replies)
Discussion started by: RAFC_99
3 Replies
9. Shell Programming and Scripting
Hi
I wanted to know if we can write a nested case in UNIX script.
Something like following -
Case ${sDB} in
Srvr1)
case ${sSchema}
Sch1)
DBusr=Username1
DBPwd=Pwd1
;;
Sch2)
DBusr=Username2
... (1 Reply)
Discussion started by: sumeet
1 Replies
10. Shell Programming and Scripting
well I found lot of topics about awk..about if command in awk..
but I had to implement this:
nawk -F"|" '
$47 ~ /0R0011/ { print > ("/home/user/M/MC.tmp" )}
$47 ~ /0R0012/ { print > ("/home/user/M/DuSI.tmp" )}
$47 ~ /0R0014/ { print > ("/home/user/M/FF.tmp" )}
$47 ~ /0R0018/ { print >... (9 Replies)
Discussion started by: abdulaziz
9 Replies