![]() |
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 |
| case command inside awk/nawk | abdulaziz | Shell Programming and Scripting | 9 | 03-09-2009 09:15 PM |
| need clarification about tr -d command ? | vparunkumar | Shell Programming and Scripting | 7 | 03-18-2008 11:08 AM |
| Sun Unix command clarification | FredSmith | SUN Solaris | 4 | 07-12-2007 02:30 AM |
| if within nawk command | kshelluser | UNIX for Dummies Questions & Answers | 1 | 11-30-2006 07:02 AM |
| nawk command not found | 12yearold | Shell Programming and Scripting | 5 | 07-07-2006 03:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
nawk command clarification
Hi,
I am using the following command. nawk '$1==p{$2=sprintf("%09d",$2+1)};1' p=$JOB_NUM q=$LEN $VALUE_TABLE > ./TEMP_TABLE As you can see the code above, I basically read a value from the table VALUE_TABLE and select a particular row based on searching the value JOB_NUM. Now Actually the string i am incrementing ie, $2 is of 9 characters. So here i am populating that value 09 here. But i want to send this value as a variable here. ie i will place the value 9 in the table and i want to read it from there. Please help me out in this, as to how to modify this code. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|