![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| manipulate a passed in parameter | rudoraj | Shell Programming and Scripting | 2 | 06-11-2007 02:04 PM |
| Perl script variable passed to Oracle query | rahulrathod | Shell Programming and Scripting | 1 | 05-30-2007 09:57 AM |
| Assigning a Variable all the Parameters passed | samit_9999 | UNIX for Dummies Questions & Answers | 2 | 12-04-2006 05:21 PM |
| variable passed to awk | whatisthis | UNIX for Dummies Questions & Answers | 8 | 09-15-2004 01:48 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Use the -v switch to pass in a variable to Awk. Go to ]GNU and search for gAwk documentation for more details.
Code:
awk -v job=$job BEGIN '{FS= "|"; print "$job\n","Question \n"} {print $1,$2,$4," ",$3}' file1
Last edited by google; 09-14-2004 at 10:07 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|