|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | 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 and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
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. |
| Sponsored Links | ||
|
|
|
||||
|
variable not retaining value
Keeping vars set in while loop with redirection Why doesn't redirecting a loop work as intended? (Bourne shell) |
|
|||
|
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. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| 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 08:28 PM |
| How to ristrict tar to span multi volume of 1.95 gig each. | interim05 | AIX | 0 | 06-19-2006 01:36 PM |
| process Span by shell | compbug | UNIX for Dummies Questions & Answers | 4 | 06-18-2006 04:43 AM |
| Will cpio span tapes ? | fidodido | Shell Programming and Scripting | 2 | 01-11-2006 08: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 12:29 PM |