I need to remove every second and every third line from a file. My idea was to do it in two operations. First every third line, then every second line. The problem is that i can't find out how to do it. I tried to look for some sed oneliners, but couldn't find any.
Suggestions? (4 Replies)
Hi,
I need some help in removing the header (first line) and the trailer (last line) in a give file...
The data file actually comes in EBCDIC format and I converted it into ASCII..
Now I need to strip off the first line and the last line..
I think we can use sed to do something like this:... (2 Replies)
hi sir,
i need help..how to remove last line of the each file
for example i have files a.txt ,b.txt and so on..i wanted to delete last list of each file..the patten not same for each file..any help?
thanks in advance (3 Replies)
Hi all, i have a text file similar to belowA1
A2
A3
B1 ... .... *** # first occurance
B1 ... .... *** # second occurance
B1 ... .... *** # third occurance My desired output is B1 ... .... *** # second occurance
B1 ... .... *** # third occurance I want to remove the first line that is after... (3 Replies)
Hi ,guys. I have one question:
I want to write a script which removes a line with certain string from a file, for example
The name of the file is: "passwd", the contents of it is below:
*************************
...
brownj2:x:5000:
hynesp:x:5001:
leeb:x:5002
dioxna:x:5003
...
... (2 Replies)
Hi!!!
When I use vi editor my file looks like this:
aaa2: 123.45^M
aaa1: 11.34^M
aaa3:
aaa3: 15.56^M
How to remove only line 3 ???
Thanks!!! (7 Replies)
Is there an easy way to remove the first line of a file so that the file:
aaron
benjamin
cecilia
daniel
elliot
fernando
would become
benjamin
cecilia
daniel
elliot
fernando (4 Replies)
I have a file output.txt. File looks like this
name1 10
name2 2
name3 5
I get a number n and I need to remove all lines which has number (after name) smaller or equal to n number.
After that I need to write lines from file and my output must be like this:
Output: 'name1 10'
Output: 'name2... (1 Reply)
Discussion started by: kubo12312
1 Replies
LEARN ABOUT DEBIAN
nntidy
NNTIDY(1) General Commands Manual NNTIDY(1)NAME
nntidy - tidy your personal .newsrc file
SYNOPSIS
nntidy [ -aciNQrsuv ] [ group ]...
DESCRIPTION
nntidy will clean out non-existing groups, adjust obviously wrong article numbers, and remove badly formed lines from your .newsrc file.
It may optionally remove ignored groups, unsubscribed groups, and groups which are not part of your presentation sequence or the groups
specified on the command line.
You should run nntidy if your rc file has been corrupted for some reason.
OPTIONS -a Equivalent to -cisu.
-c Remove unrecognized lines. This will also remove the `options' line used by some older news readers, such as readnews(1)-i Remove entries for groups which are ignored in the database, e.g. entries marked with `X' in the GROUPS file.
-r Remove entries for unsubscribed groups.
-s Remove entries which are not included in the group presentation sequence defined in the init file. If one or more groups are speci-
fied on the command line, entries not matched by these groups (and their subgroups etc) will be removed.
Notice that depending on how you construct the presentation sequence, this may cause unsubscribed groups to be removed from .newsrc,
but this will not normally happen.
-u Truncate entries for unsubscribed groups, by removing the article numbers and leaving only the news group name and the `!' mark.
-v Verbose operation. Reports each change made to the .newsrc file.
-N No update mode. The requested operations are performed, but the result is not written back to disk. This can be used with the -v
option to see whether tidying is required.
-Q Quiet operation. The version information is not printed.
FILES
~/.newsrc The record of read articles
~/.newsrc.tidy The original rc file before tidy
SEE ALSO nn(1), nncheck(1), nngoback(1), nngrab(1), nngrep(1), nnpost(1)nnadmin(1M), nnusage(1M), nnmaster(8)AUTHOR
Kim F. Storm, Texas Instruments A/S, Denmark
E-mail: storm@texas.dk
4th Berkeley Distribution Release 6.6 NNTIDY(1)