In the man pages of tail, it says "-n" option outputs last N lines...i
didnt find the option of giving +2/-2 sort of thing.  I think the
switch "-n" accepts an integer, how does it work?

B/w I need a similar help, In a file I have a line something like "set
abc 1", i want to replace this line with "set abc 0".
I have some 100's of files like this i want to replace all such
occurrences, irrespective of what the line number is.

Thanks,
sainath

On Nov 7, 10:59 am, "narendra sisodiya" <[EMAIL PROTECTED]>
wrote:
> $ tail -n+2 file1.txt
>
> this will print full file ,, except first line,,,
> so,, redirect to new file
>
> $ tail -n+2 file1.txt > file1.txt.new
>
> or better first move file
>
> $ mv file1.txt file1.txt.old
> $ tail -n+2 file1.txt.old > file1.txt
--~--~---------~--~----~------------~-------~--~----~
[EMAIL PROTECTED] mailing list -- group http://groups.google.com/group/iitdlug
-~----------~----~----~----~------~----~------~--~---

Reply via email to