odd... works just fine on my system with just the +n - jim
On Fri, 30 Jun 2006 12:08:50 -0700 James Washer <[EMAIL PROTECTED]> wrote: > Hmmm, never noticed that.. nice trick > > On Fri, 30 Jun 2006 11:13:10 -0700 > "Grant Kelly" <[EMAIL PROTECTED]> wrote: > > > Very true, and a arguably more intuitive solution than using sed. > > > > The man page for tail in Linux hardly mentions using '+'. It's not > > even shown in the SYNOPSIS; it's snuck into a descriptive paragraph > > after the list of options. > > > > On Solaris, '+' is actualy shown in the first line of the SYNOPSIS. > > Much more visible. > > > > Thanks for pointing this out (again). It will be useful to others in > > the future. > > > > Grant > > > > On 6/30/06, Jeff Shippen <[EMAIL PROTECTED]> wrote: > > > > > > heh, you guys are acting like you never got the e-mail i sent days ago > > > regarding the tail command. > > > > > > tail +301 bigfile will start at line 301 and display till the end, you > > > can > > > then use redirection to put it in a new file. So you don't have to know > > > the > > > total number of lines, just the number of lines in the beginning that you > > > want to get rid of, which you mentioned already was 300. > > > Jeff > > > > > > > > > Grant Kelly wrote: > > > I did play with the tail command, but as mentioned, you still have to > > > know the total number of lines in the file. `wc -l` took about 5 > > > minutes to calculate this number, and then you've still got to run it > > > through tail. > > > > > > Also, I wanted to remove the lines rather than ignore them so that, if > > > needed, I could reuse the file or pass it on to others without them > > > having to go through the same problem I did. > > > Furthermore, the CREATE TABLE commands were preceeded by something > > > like IF EXISTS DROP table. I had already created the tables and > > > changed them slightly, so I didn't want them re-created. sed was the > > > quickest and simplest tool for the job in this case. > > > > > > So much for a "quick question".... over 30 messages in this thread! > > > > > > Grant > > > > > > > > > On 6/30/06, James Washer <[EMAIL PROTECTED]> wrote: > > > > > > Jeezus... > > > > > > YES... the tail command gives the last "xx" lines of the files.. but > > > without counting the lines of the 2+GB file, one has no idea how many > > > lines > > > that is. Counting the lines of an arbitrarily large file, when there is no > > > need to do so, is far from efficient. > > > > > > Further try "cat < head -3 /etc/passwd" and report back on the shell > > > error > > > you receive. That's just not legal shell syntax. > > > > > > > > > _______________________________________________ > > > RLUG mailing list > > > [email protected] > > > http://lists.rlug.org/mailman/listinfo/rlug > > > > > > > > > > > > > > > > _______________________________________________ > > RLUG mailing list > > [email protected] > > http://lists.rlug.org/mailman/listinfo/rlug > > > > _______________________________________________ > RLUG mailing list > [email protected] > http://lists.rlug.org/mailman/listinfo/rlug _______________________________________________ RLUG mailing list [email protected] http://lists.rlug.org/mailman/listinfo/rlug
