On Wed, Dec 24, 2008 at 2:06 PM, Yaacov Fenster - System Engineering
Troubleshooting and other stuff wrote:
> Using trusty awk -
>
> awk -v line_num=5 '{if(NR == line_num){next;} print $0;}' < file
>> Using trusty awk -
>>
>> awk -v line_num=5 '{if(NR == line_num){next;} print $0;}' < file
AWK h
On Wed, Dec 24, 2008 at 3:03 PM, Dan Shimshoni wrote:
> Thanks!
> I want that the output will be be not the console, as it is by your
> offer, but to the same file.
> Namely , running the script on input.txt will delete a line in that
> file so that after running the script,input.txt will be the
On Wed, Dec 24, 2008 at 03:03:08PM +0200, Dan Shimshoni wrote:
> Thanks!
> I want that the output will be be not the console, as it is by your
> offer, but to the same file.
> Namely , running the script on input.txt will delete a line in that
> file so that after running the script,input.txt will
Using trusty awk -
awk -v line_num=5 '{if(NR == line_num){next;} print $0;}' < file
On 24-Dec-2008 13:34 , Dan Shimshoni wrote:
Hello,
- And in the same fun spirit :
Is it possible to delete a line in a specified file , given the
number of the line, in a non-sed script ?
DanS
On Wed, Dec
Thanks!
I want that the output will be be not the console, as it is by your
offer, but to the same file.
Namely , running the script on input.txt will delete a line in that
file so that after running the script,input.txt will be the same but
without line 5.
It can be done by two lines following yo
remove line #5:
awk '{ if (++l!=5) print $0}'
On Wed, Dec 24, 2008 at 2:06 PM, Yaacov Fenster - System Engineering
Troubleshooting and other stuff wrote:
> Using trusty awk -
>
> awk -v line_num=5 '{if(NR == line_num){next;} print $0;}' < file
>
>
> On 24-Dec-2008 13:34 , Dan Shimshoni wrote:
On Wed, Dec 24, 2008 at 01:34:08PM +0200, Dan Shimshoni wrote:
> Hello,
>
> - And in the same fun spirit :
> Is it possible to delete a line in a specified file , given the
> number of the line, in a non-sed script ?
in-line editing?
perl? python? what other language?
Or do you want to limit i
Hello,
- And in the same fun spirit :
Is it possible to delete a line in a specified file , given the
number of the line, in a non-sed script ?
DanS
On Wed, Dec 24, 2008 at 9:08 AM, Oron Peled wrote:
> On Tuesday, 23 בDecember 2008, Erez D wrote:
>
>> On Tue, Dec 23, 2008 at 10:17 AM, Valery
On Tuesday, 23 בDecember 2008, Erez D wrote:
> On Tue, Dec 23, 2008 at 10:17 AM, Valery Reznic wrote:
> > > --- On Tue, 12/23/08, Baruch Siach wrote:
> > > tail -n +5
> > It should be +6
> That is the reson i preffer "sed '1,5d' " over "tail -n +6"
Since everyone are having fun, here is another
tail -n +6
Valery
--- On Tue, 12/23/08, Tzafrir Cohen wrote:
> From: Tzafrir Cohen
> Subject: Re: un-head
> To: "linux-il"
> Date: Tuesday, December 23, 2008, 10:03 AM
> On Tue, Dec 23, 2008 at 09:53:00AM +0200, Erez D wrote:
> > hi
> >
> > head -
On Tue, Dec 23, 2008 at 10:17 AM, Valery Reznic wrote:
>
>
>
> --- On Tue, 12/23/08, Baruch Siach wrote:
>
> > From: Baruch Siach
> > Subject: Re: un-head
> > To: "Erez D"
> > Cc: "linux-il"
> > Date: Tuesday, December 23, 2008,
--- On Tue, 12/23/08, Baruch Siach wrote:
> From: Baruch Siach
> Subject: Re: un-head
> To: "Erez D"
> Cc: "linux-il"
> Date: Tuesday, December 23, 2008, 10:07 AM
> Hi Erez,
>
> On Tue, Dec 23, 2008 at 09:53:00AM +0200, Erez D wrote:
&g
On Tue, Dec 23, 2008 at 09:53:00AM +0200, Erez D wrote:
> hi
>
> head -5 will give me the first 5 lines of file.
>
> i'm looking for somthing that will give me everything but the first 5 lines.
>
> i know i can get the lines with 'wc -l' , then substract 5, and then use
> tail.
> is there an un
what i love about linux, is that there are always more than one way to do
what i want ...
thank you all
erez.
Hi Erez,
On Tue, Dec 23, 2008 at 09:53:00AM +0200, Erez D wrote:
> i'm looking for somthing that will give me everything but the first 5 lines.
tail -n +5
baruch
--
~. .~ Tk Open Systems
=}oo
On Tue, Dec 23, 2008 at 09:53:00AM +0200, Erez D wrote:
> hi
>
> head -5 will give me the first 5 lines of file.
>
> i'm looking for somthing that will give me everything but the first 5 lines.
>
> i know i can get the lines with 'wc -l' , then substract 5, and then use
> tail.
> is there an un
16 matches
Mail list logo