![]() |
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 |
| How to print data between 2 lines in a file | kamesh83 | UNIX for Advanced & Expert Users | 5 | 12-18-2008 12:14 PM |
| How to print only lines in between two strings using awk | jisha | Shell Programming and Scripting | 4 | 01-11-2008 04:13 AM |
| print selected lines | tonet | Shell Programming and Scripting | 6 | 10-08-2007 05:50 AM |
| How to print specific lines with awk | Bugenhagen | Shell Programming and Scripting | 10 | 08-16-2007 06:41 AM |
| Print only certain lines from a text file | CamTu | Shell Programming and Scripting | 1 | 06-01-2005 11:47 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
print all even lines of a txt file
In other news, I have a colors text file with hundreds of lines, and I want to print only the even numbered lines. for example I have this file looks something like this:
ALLCOLORS.TXT red red green red blue red red red green red red blue green green green blue blue blue red blue blue blue and I want a command that outputs something like this: ALLEVEN.TXT blue red red red green green green red blue blue blue Another way of asking this is how do I delete all of the ODD numbered lines out of a file?? Thanks again!!! I love this place! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|