8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI everyone,
I am not able to find error in the script, when i run the script till
line No. 20
i.e, read var4
everything runs fine. After that the script exits out.
#!/bin/bash
echo -e "Want dryrun OR merge: \n "
read var1
if ] ; then
echo -e "\n Please select from the given... (10 Replies)
Discussion started by: rishi.aradhya
10 Replies
2. Shell Programming and Scripting
Hi Team,
I just want to check whether my nested if loop used is correct or not.
if ]
if ]
export1
else
export2
fi
else
if ]
export3
else
export4
fi
fi
Thanks
Shiva (5 Replies)
Discussion started by: shivashankar_S
5 Replies
3. Shell Programming and Scripting
Hi,
I have to assign a value for a varaiable based on a Input. I have written the below code:
if
then
nf=65
elif
then
nf=46
elif
then
nf=164
elif
then
nf=545
elif
then
nf=56
elif
then (3 Replies)
Discussion started by: machomaddy
3 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. Shell Programming and Scripting
Trying to clean up the last little thing in this script which is that the mv always performs no matter whether it is needed or not. It doesn't cause any bugs just prints an unsightly "can't mv source and dest are the same". Obviously I want to get rid of it but having issues getting the... (4 Replies)
Discussion started by: Calbrenar
4 Replies
6. Shell Programming and Scripting
Greetings All,
The following script attempts to enumerate all users in all groups in the group file(GROUP) and echo the following information:
GROUP ---> USER
The script is as follows:
IFS=","
for GROUP in `ypcat -k group | cut -d" " -f1`
do
for USER in `ypcat -k group... (13 Replies)
Discussion started by: jacksolm
13 Replies
7. Shell Programming and Scripting
I need help getting over this bump on how nested for loops work in shell. Say i was comparing files in a directory in any other language my for loop would look like so
for(int i=0;to then end; i++)
for(int y = i+1; to the end; y++)
I can't seem to understand how i can translate that... (5 Replies)
Discussion started by: taiL
5 Replies
8. Shell Programming and Scripting
Is there any way to do variable nesting using sh?
For example:
example_1="a test string"
example_2="another test"
example_3="etc..."
i=2
echo ${example_$i}
The shell reports:
sh: ${example_$i}: bad substitution
If not, maybe someone could suggest another method. Thanks in... (3 Replies)
Discussion started by: kevinl33
3 Replies