10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello experts,
I am having problems with ELIF.
Please see the below code :
read a;
read b;
read c;
if || || ; then
echo "EQUILATERAL"
elif || || ; then
echo "SCALENE"
else
echo "ISOSCELES"
fi
This code works fine for the EQUILATERAL case but fails completely for the... (5 Replies)
Discussion started by: H squared
5 Replies
2. Shell Programming and Scripting
I have written the below PERL script to reprocess messages from a failure queue.
It basically browses all the messages in the failure queue to individual files in a directory and then scans those files to determine the originating queue. The script will then move each message in turn from the... (0 Replies)
Discussion started by: chris01010
0 Replies
3. Shell Programming and Scripting
Hi,
I'm developing a script which will have a lot of options to be checked for and will be setting things / doing further things accordingly.
I'm using a LOT of nested if, elif, else throughout my script. In some cases 5 to 6 levels deep. I'm facing some very basic problems. I've torn my... (4 Replies)
Discussion started by: umar.shaikh
4 Replies
4. UNIX for Dummies Questions & Answers
Hello forum memebers.
can you correct the simple while program.
#! /bin/ksh
count=10
while
do
echo $count
count='expr$count-1'
done
I think it will print 10 to 1 numbers but it running for indefinite times. (2 Replies)
Discussion started by: rajkumar_g
2 Replies
5. Shell Programming and Scripting
Hi!
I have here a simple script to change the advskew on carp interfaces. The first is working, but the part for status, where a for is within a if/else delivers everyime only the action for the value "prod". Even when i use type test or dev. Where did i made the mistake?
# $Log:... (2 Replies)
Discussion started by: locutus01
2 Replies
6. Shell Programming and Scripting
Hi All,
How to read a file upto last line(End Of Line)
I wrote below program:
cat R2_20060719.610.txt | while read LINE
do
echo "$LINE"
done
above code reading all lines from a file and skipping last line......
is there anything wrong in my code.
Please help me out from this... (20 Replies)
Discussion started by: rkrgarlapati
20 Replies
7. UNIX for Dummies Questions & Answers
I am trying to setup an if, elif statement that is dependant on a variable. If the user does not enter a valid option I would like it to prompt them again and start the loop over. Here is what I have so far:
echo -n "enter variable (a, b, or c): "
read freq
if ;
then echo "a"
elif ;... (2 Replies)
Discussion started by: BStanley346
2 Replies
8. Shell Programming and Scripting
i have a script that will read each line and then grep a particular pattern and do some_stuff. Below the script
while read j
do
q1=0
q1=`$j | grep 'INFO - LPBatch:' | wc -l`
if
then
$j | tr -s " " | cut -d " " -f8,42,43 >> nav1.txt
fi
q2=0
q2=`$j | grep 'INFO - Number of Intervals... (12 Replies)
Discussion started by: ali560045
12 Replies
9. Shell Programming and Scripting
Hi folks,
I have written down a UNIX script which actually FTP the file to other server. What is happening now , this script is not working only for 1 server , as it is working for 32 different FTP server .
In this particular server , we are getting message “FTp:550 access denied”... (1 Reply)
Discussion started by: khan1978
1 Replies
10. Shell Programming and Scripting
PLZ Help us. I need to write a "while loop" script in borne shell to go into the /tmp directory every second and update me with the size of every file in the temp directory. My boss sprung this on me today and I have to have the script done by tomorrow. I can't loose my job, cause my wife and I... (1 Reply)
Discussion started by: scoobydoo
1 Replies