| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hello, I have a file with more then 1000 lines but I would like to get only the odd lines of this file.. or the inverse the even lines of this file. How can I do that with AWK? Thank you in advance |
|
#2
| |||
| |||
| Ops.. I found out how to do it: awk '!(NR%2)' file or the inverse awk '(NR%2)' file Thank you anyway On Aug 13, 2:38 pm, Minalba Jordao <minalbajor...@gmail.com> wrote: > Hello, > > I have a file with more then 1000 lines > > but I would like to get only the odd lines of this file.. or the > inverse the even lines of this file. > > How can I do that with AWK? > > Thank you in advance |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.