How to use nested ifs in unix?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to use nested ifs in unix?
# 1  
Old 11-28-2011
How to use nested ifs in unix?

how to use nested ifs in unix
# 2  
Old 11-28-2011
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Convert CSV file to nested XML file using UNIX/PERL?

we have a CSV which i need to convert to XML using Perl or Unix shell scripting. I was able to build this XML in oracle database. However, SQL/XML query is running for long time. Hence, I'm considering to write a Perl or shell script to generate this XML file. Basically need to build this XML... (3 Replies)
Discussion started by: laknar
3 Replies

2. Shell Programming and Scripting

Nested ifs

hi I keep getting an error with this nested if statement and am getting the error unexpected end of file, can anyone help me as to why this wont execute? #!/bin/bash #script to check wether the -i -v statements run correctly removeFile () { mv $1 $HOME/deleted }... (3 Replies)
Discussion started by: somersetdan
3 Replies

3. UNIX for Dummies Questions & Answers

Nested If in Unix

Hi!! LookVar=`find . -name "${input}" | wc -w` if then cd $input rm -f * ftp -n -i $HostName << EOF quote USER $User quote PASS $Password cd $Path SoLookVar=`find . -name "${input}" | wc -w` echo $SoLookVar if then cd $input mget ./* bye EOF chmod 775 ./* (12 Replies)
Discussion started by: Afsana
12 Replies

4. Shell Programming and Scripting

While loop and IFS?

Hi, while ; do echo "Please enter " read enter yyyy=${enter:0:4} mm=${enter:5:2} dd=${enter:8:2} result=`validateDate $yyyy $mm $dd` When does the loop keeping repeating till?? till 1 is equal to 1? what does this mean "${enter:0:4}" .The 0 and 4 part?? ... (3 Replies)
Discussion started by: sid22
3 Replies

5. Shell Programming and Scripting

Nested loop in Unix

Hi, I have the following script which is two while loops, but it is working only for the Inner loop without going back to the outer loop. the aim of this script is to remove data files from memory after each five times for each setting of the rotate parameter #!/bin/csh set hdir =... (1 Reply)
Discussion started by: moon218
1 Replies

6. Shell Programming and Scripting

Nested Case in UNIX script

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

7. Shell Programming and Scripting

regarding IFS=

hi i am a learner can some explain "export IFS=$(echo "\n\t\a")" i am not able to understand the functionality please help thanks Satya (1 Reply)
Discussion started by: Satyak
1 Replies

8. Shell Programming and Scripting

Shell nested ifs

Hi can someone tell me whats wrong with the following: #!/bin/sh file1=$1 file2=$2 if then if then echo "File 1 is" $file1 echo "File 2 is" $file2 cp $file1 $file2 echo "Copy complete!" else echo "ERROR: File does not exist!" ... (8 Replies)
Discussion started by: philmetz
8 Replies

9. Shell Programming and Scripting

Trouble with Nested Ifs

What I thought was going to be very simple has turned out to be really lame, and so I come to you for help. mountedon=`df -k /synctest | awk 'NR == 2 {print $1}'` if then # mount /pupcl06 mountedon=`df -k /synctest | awk 'NR == 2 {print $1}'` if then mailx -s... (2 Replies)
Discussion started by: ProFiction
2 Replies

10. Shell Programming and Scripting

can nested SQl be run in Unix Script?

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
Login or Register to Ask a Question