This is a discussion on How to pass shell variable to awk program within the Shell scripting forums, part of the Development/Scripting category; Is it possible to pass a shell variable to an awk program? If so please gimme example...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
| Sponsored Links | ||
|
|
|
|||
|
It is possible and it can be a solution (i think)
#your shell script ......................... ......................... ......................... awk -v var1=`echo $nam_var1` -v var2=`echo $nam_var2` ............. remember to delete your script var when you finish |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| environmental variable | myfoot | CentOS / RHEL / Fedora | 1 | 02-01-2008 07:14 AM |
| Passing value from variable while its expected from keyboard | unix11 | Shell scripting | 3 | 02-22-2007 03:36 PM |
| SED pass a output line to another | cillo | Shell scripting | 6 | 11-01-2006 02:59 PM |
| user pass word | sparky | Shell scripting | 1 | 06-26-2006 08:19 PM |
| HTML variable | nathan86 | Linux software | 3 | 03-23-2005 01:29 PM |