(reposting)
Afaik, vi can run in non-interactive, "batch" mode too.
But I'd go with tail +6
Tanel.
- Original Message -----
To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
Sent: Sunday, September 14, 2003 10:49 PM
> Mladen ,I want to automate this thing. So don't want
> to go with :1,5d stuff
>
> --- Mladen Gogala <mgogala_at_adelphia.net> wrote:
> > The best thing to do would be something like:
> > vi filename
> > :1,5d
> > :x!
> >
> > That would do the trick.
> > Also this:
> >
>
*
> >
> > #!/usr/bin/perl -w
> > use strict
> > my $ind=1;
> > open FILE1,"/file1/path"||die "Cannot open
> > file1:$!\n";
> > open FILE2,">/file2/path"||die "Cannot open
> > file2:$!\n";
> >
> > # Skip 5 lines
> >
> > for($ind=1;$ind<=5;$ind++) { <FILE1>; }
> >
> > # copy files
> > while (<FILE1>) { print FILE2 $_; }
> > print "I'm all done\n";
> >
>
> >
> > On 2003.09.14 12:14, Tim Gorman wrote:
> > > sed '6,$p' filename > new-filename
> > >
> > > on 9/14/03 7:49 AM, Oracle DBA at
> > sami_resume_at_yahoo.com wrote:
> > >
> > > > Hi List,
> > > >
> > > > I want to remove the first 5 lines of the text
> > from
> > > > unix text file. Is there a command to do it
> > without
> > > > opening a file manually? (I don't want to use
> > (DD
> > > > command)
> > > >
> > > > For example,
> > > > ==============
> > > > 1 to be removed
> > > > 2 to be removed
> > > > 3 to be removed
> > > > 4 to be removed
> > > > 5 to be removed
> > > > aaaaaaaaaaaaaaaaa
> > > > sssssssssssssssss
> > > > eeeeeeeeeeeeeeee
> > > > ==============
> > > >
> > > > Any help would be really appreciated.
> > > > TIA
> > > > Sami
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > > > http://sitebuilder.yahoo.com
> > >
> > > --
> > > Please see the official ORACLE-L FAQ:
> > http://www.orafaq.net
> > > --
> > > Author: Tim Gorman
> > > INET: tim_at_sagelogix.com
> > >
> > > Fat City Network Services -- 858-538-5051
> > http://www.fatcity.com
> > > San Diego, California -- Mailing list and
> > web hosting services
> > >
> >
> ---------------------------------------------------------------------
> > > To REMOVE yourself from this mailing list, send an
> > E-Mail message
> > > to: ListGuru_at_fatcity.com (note EXACT spelling of
> > 'ListGuru') and in
> > > the message BODY, include a line containing: UNSUB
> > ORACLE-L
> > > (or the name of mailing list you want to be
> > removed from). You may
> > > also send the HELP command for other information
> > (like subscribing).
> > >
> >
> > --
> > Mladen Gogala
> > Oracle DBA
> > --
> > Please see the official ORACLE-L FAQ:
> > http://www.orafaq.net
> > --
> > Author: Mladen Gogala
> > INET: mgogala_at_adelphia.net
> >
> > Fat City Network Services -- 858-538-5051
> > http://www.fatcity.com
> > San Diego, California -- Mailing list and web
> > hosting services
> >
> ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an
> > E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of
> > 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB
> > ORACLE-L
> > (or the name of mailing list you want to be removed
> > from). You may
> > also send the HELP command for other information
> > (like subscribing).
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Oracle DBA
> INET: sami_resume_at_yahoo.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Tanel Poder
INET: tanel.poder.003_at_mail.ee
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Sep 16 2003 - 06:54:31 CDT