10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I'm trying to understand better the while and until loops, can someone help me with this example?
# Listing the planets.
for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto
echo $planet # Each planet on a separate line.
for... (3 Replies)
Discussion started by: jose2802
2. UNIX for Dummies Questions & Answers
I'm not sure if this is more appropriate for the 'unix for dummies' or the 'unix for experts' forum because I'm new to this forum and this is the second topic I've discussed, but if you could let me know which one was more appropriate for something like this, please do!
So in tr (an... (2 Replies)
Discussion started by: juliette salexa
3. Shell Programming and Scripting
I want to execute a script the number of times a user enters. Please can you advise on hor can I do the same.
Shazin (4 Replies)
Discussion started by: Shazin
4. Shell Programming and Scripting
A= a c b t g j i e d
B= t y u i o p
for i in $(cat $A)
for j in $(cat $B)
then (1 Reply)
Discussion started by: vadharah
5. UNIX for Dummies Questions & Answers
I am traversing down a list, and I am not quite sure how to tell the loop to break when it's done going through the file.
read list <&3
is the code. The file "list" is simply
any advice on how to break the loop after the file is... (1 Reply)
Discussion started by: MaestroRage
6. Shell Programming and Scripting
I've a file like so:
Now, I want to read my file and take ex. the Media ID and the Type for each groups of Media (Media1,Media2,...,Media(n):
while read FILE
while $(FILE|cut -d: -f1)=Media$i
#here will be some test, ex:
#if Media ID < 23
... (4 Replies)
Discussion started by: nymus7
7. UNIX for Dummies Questions & Answers
how can I use "for" to have two loops :
this is my script :
for i in (A B C)
for j in (a b c)
I want to print out
But I have error message :
syntax error at line 1 : `(' unexpected
Many thanks before.
How should I use "for" ?? (2 Replies)
Discussion started by: big123456
8. UNIX for Dummies Questions & Answers
I'm trying to create a loop that will prompt the user for 15 values, not forcing them to enter all 15. If the user enters through one or more of the prompts the null value needs to be converted to 0, otherwise set the parameter = to the value entered:
Please enter file no #1: 17920
... (4 Replies)
Discussion started by: vdc
9. Shell Programming and Scripting
I am running on HPUX using ksh.
I have a script that uses a loop within a loop, for some reason the script seems to hang on a particuliar record. The record is fine and hits the condition in Blue. If I kill the 1st loop process the script continues on with no problem.
<Some... (8 Replies)
Discussion started by: bthomas
10. UNIX for Dummies Questions & Answers
hello....very new user to unix...and i have a question..i am not sure if there is such a thing
For example...the user is asked if he likes Bananas....if he says yes....
echo You like Bananas $name
at the end of the script it echos all that the user has entered so they can read it....
but... (1 Reply)
Discussion started by: jonas27