![]() |
|
|
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 |
| print selected lines | tonet | Shell Programming and Scripting | 6 | 10-08-2007 06:50 AM |
| return number of rows selected | new2ss | Shell Programming and Scripting | 7 | 01-08-2007 10:46 AM |
| how to do selected copy | dbasan | SUN Solaris | 3 | 06-13-2006 12:19 PM |
| flags to suppress column output, # of rows selected in db2 sql in UNIX | jerardfjay | Shell Programming and Scripting | 1 | 11-02-2005 06:48 AM |
| Cutting rows after a selected point | nhatch | Shell Programming and Scripting | 4 | 09-05-2003 11:14 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
print selected rows with awk
Hi everybody:
Could anybody tell me how I can print from a file a selected rows with awk. In my case I only want print in another file all the rows from NR=8 to NR=2459 and the increment each 8 times. I tried to this: awk '{for (i=8; i=2459; i+=8); NR==i}' file1 > file2 But doesn't work. Thanks in advance. ![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|