10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
have written the below code to check whether the string received from user is a file name or dir using case statement, but its going into default case*).
#!/bin/sh
#Get a string from user and check whether its a existing filename or not
rm str2
rm str3
echo "enter a file \c"
read fil... (8 Replies)
Discussion started by: Mohan0509
8 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,
I am New to Unix Shell Scripting basically, i need some help in achieving a case statement in Shell script to call recursively That is if case having like 1 2 3 4 options , if user inputs 1 and gets executed case should ask for options again but user should not input the same input value 1,... (7 Replies)
Discussion started by: karthikram
7 Replies
4. Shell Programming and Scripting
i could like to try when i input a integer , the program would give the result i want but it doesnt .
http://i.imgur.com/LqOczGM.jpg
I input 2 , and the result should be "it is greater than or equal to one"
could any ching give me improvement ? If i must use case command .
thank you... (14 Replies)
Discussion started by: SSUUser
14 Replies
5. Shell Programming and Scripting
please let me know if the below code could be written efficiently inside single awk
case "$INP" in
ksh)
cat catalog | awk 'BEGIN {FS=",";} { print $2 } END {}'
;;
pset)
cat catalog | awk 'BEGIN {FS=",";} { print $3 } END {}'
;;
dml)
cat catalog | awk 'BEGIN {FS=",";} {... (2 Replies)
Discussion started by: cvsanthosh
2 Replies
6. 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
7. 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
8. Shell Programming and Scripting
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Discussion started by: abhilash mn
1 Replies
9. Shell Programming and Scripting
can nested SQl be run in Unix Script?
I tried some and found only simply sql(one select) can work well in unix script. (21 Replies)
Discussion started by: YoYo
21 Replies
10. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies