![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing a variable inside a variable to a function | KingVikram | UNIX for Dummies Questions & Answers | 2 | 01-14-2008 05:28 PM |
| How to ristrict tar to span multi volume of 1.95 gig each. | interim05 | AIX | 0 | 06-19-2006 09:36 AM |
| process Span by shell | compbug | UNIX for Dummies Questions & Answers | 4 | 06-18-2006 12:43 AM |
| Will cpio span tapes ? | fidodido | Shell Programming and Scripting | 2 | 01-11-2006 05:42 AM |
| ksh: A part of variable A's name is inside of variable B, how to update A? | pa3be | Shell Programming and Scripting | 4 | 03-30-2005 08:29 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
span of variable
Hi all,
I am having a hard time in determining this. I have a shell script, in which I build a variable in a certain format (-i 'x x.in x.out' -i 'y y.in y.out' -i 'z z.in z.out) within a while loop. But that variable is getting lost if I read it after the while loop is ended. I tried "export".., that did not seem to work either...! please help somebody. thanks. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
#3
|
|||
|
|||
|
thanks .. , but the way I have my while loop is this...
awk '/^[^#]/ {print $0}' file | while read f1 f2 f3 f3 do ..... ... build the variable - v done read the variable v. (Here v is empty) i will keep reading the links... in the mean time. |
|
#4
|
||||
|
||||
|
Um, in case you don't know what a pipe does, proc1 | proc2 forces proc2 to redirect it's input to a pipe which proc1 is writing to. If proc2 is a loop being managed by a bourne shell, it will become a subshell.
|
||||
| Google The UNIX and Linux Forums |