![]() |
|
|
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 |
| pass parameter to function | vasuarjula | Shell Programming and Scripting | 3 | 01-12-2009 08:58 PM |
| [csh] How to capture output from a command and pass it on to a variable? | machinogodzilla | Shell Programming and Scripting | 3 | 05-11-2008 10:36 AM |
| How to pass variables to FUNCTION ? | bh_hensem | Shell Programming and Scripting | 5 | 05-31-2007 03:54 AM |
| Pass argument to function | Knotty | UNIX for Dummies Questions & Answers | 1 | 04-08-2007 09:26 AM |
| can I pass awk variable to system command? | zhynxn | Shell Programming and Scripting | 2 | 07-05-2006 12:11 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
how to pass variable in NR function used in awk command?
Hi
I want to pass variables with the NR function in awk command. test_file1 is input file having 500 records. var1=100. var2=200 awk -F" " 'NR >= $var1 && NR <= $var2' test_file1 > test_file2. My end result should be that test_file2 should have records from line number between $var1 and $var2. Any other commands for it? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|