![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Replacement for sed | dbsurf | Shell Programming and Scripting | 0 | 01-25-2008 06:47 PM |
| Regarding Replacement | rajx | UNIX for Dummies Questions & Answers | 2 | 05-22-2007 09:19 AM |
| variable replacement | ppass | Shell Programming and Scripting | 4 | 06-01-2005 10:18 AM |
| Replacement using sed | handak9 | UNIX for Dummies Questions & Answers | 5 | 07-13-2004 11:28 AM |
| cpu replacement. help | IMPTRUE | UNIX for Dummies Questions & Answers | 3 | 07-25-2003 08:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Awk variable replacement
I have a function
awkvarrep() { awk -F'|' '$1~/$1/{printf "%-10s %-30s %-15s %-30s %-15s\n", $2,$3,$4,$5,$6}' testfile } I'm calling it by this VARREP=XYZ awkvarrep $VARREP since i'm passing $VARREP to the awkvarrep() function I want to use this with $1 but it dosen't seem to be working inside the awk in the Shell Script. Do I need to use an escape sequence for it to work pls advice or else I need to do this like 10 times! |
|
||||
|
Quote:
|
| Sponsored Links | ||
|
|