10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am looping through a file in bash and performing some operations on it. Here is the code.
cat test.dat -
Case 1: With if inside while loop
file found :)
isn't it supposed to print following output !!!
one (3 Replies)
Discussion started by: qwarentine
2. Shell Programming and Scripting
i am new to shell scripting. this is similar to the code which i was writing for some other work. i want the variable 'x' to have the value which it will finally have at the end of the loop ( the number of directories ). but the value of 'x' only changes inside the loop and it remains '0' out-side... (3 Replies)
Discussion started by: chathura666
3. Shell Programming and Scripting
I have a script that only works if I remove it from the looping scenario.
# Set the field seperator to a newline
# Loop through the file
##for line in `cat nlist.txt`;do
# put the line into a variable.
echo "copying plugin..."
... (6 Replies)
Discussion started by: bugeye
4. Shell Programming and Scripting
i have a for loop statement in my ksh code. it only returns the first value retrieved not the value for the other rows.
ex: acct_id value = returned value in the for loop
1 = 1
2 = 1 (instead of 2)
3 = ... (1 Reply)
Discussion started by: ryukishin_17
5. Shell Programming and Scripting
maybe you can help me.. what am i doing wrong?
Why this doesn`t work in ksh.
echo "Type y or n"
i also tried this
... (6 Replies)
Discussion started by: xcitan
6. Shell Programming and Scripting
It just does the break...even though the files are not the same...
# Compare extracts
while (( count < 5 ))
(( count+=1 ))
echo "Try $count"
file1=$(ls -l /tmp/psjava.xml|... (5 Replies)
Discussion started by: sigh2010
7. Shell Programming and Scripting
I have a script which uses below for loop:
for (( i = 0 ; i <= 5; i++ ))
echo "Welcome $i times"
But when I run the script, it gives error message:
Syntex Error : Bad for loop variable
Can anyone guide to run it?
Thanks in advance. (10 Replies)
Discussion started by: naw_deepak
8. UNIX for Dummies Questions & Answers
I have written a script to run on UNIX server. When I tested, it always hanged on after "date +"%D %T: XXXXXX script started." part. Then it wouldn't go further. UNIX server gave me one error message. I used the same code in another script. It works fine. I think the major problem may be in... (3 Replies)
Discussion started by: duke0001
9. UNIX for Dummies Questions & Answers
my crontab -e dosent work. Im getting this error message:
sh: VI: not found
The crontab files was not changed.
How do i make it work? I think you should use "export editor=vi"
or something. But i cant seem to get the correct line!
pleas help... (11 Replies)
Discussion started by: dozy
10. UNIX for Dummies Questions & Answers
hi , folks i m back with again some silly question i think.!!
i can do ftp , telnet from windows to unix machine , but not vice versa!!! , from unix box , i get connection refused , and ping says not alive. ,...my os . solaris 7 , ok i know ishouldnt load network by using traceroute , but itried... (2 Replies)
Discussion started by: definate