10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i m trying to create script which logic is like below.
if ; then
x=`cat /tmp/testoutput.log | grep STOP | wc -l`
y=`cat /tmp/testoutput.log | grep RUN | wc -l`
if ; then
echo "process stop"
if ; then
echo "process running "
else
echo "file not found"
fi
----------------... (2 Replies)
Discussion started by: tapia
2 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 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
4. 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
5. UNIX for Dummies Questions & Answers
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
6. Programming
Hi, I bought a module called "Price comparison listing" for Prestashop that was supposed to help me push product listing to kelkoo. Unfortunately it doesnt work and the developers don't fix, and they don't refund.... I have reported this to prestashop, but I need a solution..
Be careful buying... (1 Reply)
Discussion started by: joje47
1 Replies
7. Programming
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies
8. Web Development
PHP question...
I have an SQL query that's pulled back user IDs as a set of columns. Rather than IDs, I want to use their names.
So I have an array of columns $col with values 1,7,3,12 etc and I've got an array $person with values "Fred", "Bert", "Tom" etc
So what I want to do is display the... (3 Replies)
Discussion started by: JerryHone
3 Replies
9. 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
10. Shell Programming and Scripting
I have three arrays which hold three elements each.
I have a fourth array which contains the names of those three arrays.
I'm having difficulty creating a nested loop that can loop through each array and echo their values.
script
#!/bin/ksh
# array of locations (usa, london, australia)... (1 Reply)
Discussion started by: yongho
1 Replies