Re: un-head

2008-12-24 Thread Oleg Goldshmidt
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 has useful defaults, so

awk 'NR != 5' filename

should also work.


-- 
Oleg Goldshmidt | p...@nospam.goldshmidt.org

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Ubuntu kernel build - ignores .config ??

2008-12-24 Thread Lev Olshvang

Evening all,


I need to rebuild kernel for my Ubuntu 7.10 box .

So I had installed linux-source package and made menuconfig. ( I do not 
need make-dpkg since I used to do things manually)


And I see that .config file indeed is build according to my request and 
only my hardware devices are present in  it.


To my surprise, the next command - make all  still makes modules for the 
whole universe of devices.



What is going here ?

Regards, Lev





=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: un-head

2008-12-24 Thread Erez D
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 same but
> without line 5.
>
> It can be done by two lines following your suggestion thus:
>
> awk -v line_num=5 '{if(NR == line_num){next;} print $0;}' < input.txt
> > output.txt
>
> mv output.txt input.txt
>
>
> Can it be done in one line ?
> Rgs,
> DanS
>

of course:

lets delete 1 line starting from line #5 in file a.txt:
(echo ":5d1"; echo ":x")|ex a.txt


>
>
> 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:
> >
> > 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 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 one: sed -n '6,$p'
> >
> > --
> >
> > Oron Peled Voice/Fax: +972-4-8228492
> >
> > o...@actcom.co.il 
> > http://www.actcom.co.il/~oron
> >
> > "Linux: like the air you breathe, ubiquitous and free"
> >
>


Re: un-head

2008-12-24 Thread Tzafrir Cohen
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 be the same but
> without line 5.
> 
> It can be done by two lines following your suggestion thus:
> 
> awk -v line_num=5 '{if(NR == line_num){next;} print $0;}' < input.txt
> > output.txt
> 
> mv output.txt input.txt

perl -ni -e 'print unless ($. == 5)' file_that_had_line_5.txt

But this is cheating :-)

See also s2p(1).

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: un-head

2008-12-24 Thread Yaacov Fenster - System Engineering Troubleshooting and other stuff

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 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 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 one: sed -n '6,$p'

--

Oron Peled Voice/Fax: +972-4-8228492

o...@actcom.co.il http://www.actcom.co.il/~oron

"Linux: like the air you breathe, ubiquitous and free"



Re: un-head

2008-12-24 Thread Dan Shimshoni
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 your suggestion thus:

awk -v line_num=5 '{if(NR == line_num){next;} print $0;}' < input.txt
> output.txt

mv output.txt input.txt


Can it be done in one line ?
Rgs,
DanS


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:
>
> 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 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 one: sed -n '6,$p'
>
> --
>
> Oron Peled Voice/Fax: +972-4-8228492
>
> o...@actcom.co.il http://www.actcom.co.il/~oron
>
> "Linux: like the air you breathe, ubiquitous and free"
>


Re: un-head

2008-12-24 Thread Erez D
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:
>
> 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 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 one: sed -n '6,$p'
>
> --
>
> Oron Peled Voice/Fax: +972-4-8228492
> o...@actcom.co.il http://www.actcom.co.il/~oron 
> 
>
> "Linux: like the air you breathe, ubiquitous and free"
>
>
>


Re: PDF Editor

2008-12-24 Thread Dotan Cohen
2008/12/24 Uri Evenhen Mor :
> On Wed, Dec 24, 2008 at 12:27 PM, Dotan Cohen  wrote:
>>
>> Ghostscript seems to be the standard tool for this kind of stuff. It
>> is available for Windows as well as Linux.
>
> Does Ghostscript support GUI?
> Can you send me a link for downloading Ghostscript?  I tried to
> download it but the link didn't work.
>

Try one of these:
http://en.wikipedia.org/wiki/Ghostscript#Frontends

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: un-head

2008-12-24 Thread Tzafrir Cohen
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 it to a one-liner? no loops?

-- 
Tzafrir Cohen | tzaf...@jabber.org | VIM is
http://tzafrir.org.il || a Mutt's
tzaf...@cohens.org.il ||  best
ICQ# 16849754 || friend

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il



Re: un-head

2008-12-24 Thread Dan Shimshoni
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 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 one: sed -n '6,$p'
>
> --
>
> Oron Peled Voice/Fax: +972-4-8228492
>
> o...@actcom.co.il http://www.actcom.co.il/~oron
>
> "Linux: like the air you breathe, ubiquitous and free"


Re: PDF Editor

2008-12-24 Thread Uri Evenhen Mor
On Wed, Dec 24, 2008 at 12:27 PM, Dotan Cohen  wrote:
>
> Ghostscript seems to be the standard tool for this kind of stuff. It
> is available for Windows as well as Linux.

Does Ghostscript support GUI?
Can you send me a link for downloading Ghostscript?  I tried to
download it but the link didn't work.

>
> --
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
>
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
> ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
> А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
> а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
> ä-ö-ü-ß-Ä-Ö-Ü
>



-- 
Uri Evenhen Mor (Ore)
Mobile Phone: +972-50-9007559
E-mail: u...@speedy.net
Blog: http://www.speedy.net/uri/blog/

Now working on version l.l of the pie - defined as o/o or olo or lol.
I discovered the number of dots is very important - l..l is not equal
to l.l; and l is not equal to l.  I am working on dividing your
numbers and numbering your primes.  it's very complicated, since every
number can be considered prime, not prime, integer and irrational.
remember there is at least one more root to every equation than what
you previously thought, for example there are at least pie square
roots of the number pie.

Update: moved my blog to http://www.speedy.net/uri/blog/ .  I decided
to remove other content from this website.

[o-o-o-oo-o-o-o][o-o-o-oo-o-o-o]
- This message is confidential -
[o-o-o-oo-o-o-o][o-o-o-oo-o-o-o]


Re: PDF Editor

2008-12-24 Thread Dotan Cohen
2008/12/22 Uri Evenhen Mor :
> Hi Omer, Linux-IL friends,
>
> I need a program for editing and creating PDF files.  I understand
> adobe is the official creator of PDF format.  I searched but I can't
> find a good PDF editor (GPL or free software).  Do you recommend
> ghostscript or any other software?  Please also send me links for
> download (I need to run this software on Windows XP).
>
> P.S. sorry friends, I can't move to Linux.  There are so much software
> I'm used to use on Windows.  I just bought a new computer recently,
> also Windows XP + Microsoft Office.  I just can't see myself getting
> used to something else...
>
> by the way - we created PDF files from AutoCAD, but I need to rotate
> them 90 degrees.  that's the only edition I need to do now for PDF
> files.  If you want you can look at
> http://www.pazgal.co.il/products/industrial/peled_18/ - that's what
> I'm doing right now.
>

Ghostscript seems to be the standard tool for this kind of stuff. It
is available for Windows as well as Linux.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: PDF Editor

2008-12-24 Thread Uri Evenhen Mor
On Tue, Dec 23, 2008 at 10:37 AM, Saba Moshe  wrote:
> http://www.foxitsoftware.com/pdf/reader_2/reader-interstitial.html
>
> It rotates the pages and GUI

I tried the reader, but it can't save the rotated file.

>
> Saba Moshe
>
>
> On 12/22/08, Uri Evenhen Mor  wrote:
>> On Mon, Dec 22, 2008 at 2:38 PM, Meir Kriheli  wrote:
>>> Usually pdftk is the 1st which comes to mind:
>>> http://www.pdfhacks.com/pdftk/
>>
>> Thanks.  It does the work, although I would prefer GUI instead of
>> command line interface.
>>
>> Uri.
>> --
>> Uri Evenhen Mor (Ore)
>> Mobile Phone: +972-50-9007559
>> E-mail: u...@speedy.net
>> Blog: http://www.speedy.net/uri/blog/
>>
>> Now working on version l.l of the pie - defined as o/o or olo or lol.
>> I discovered the number of dots is very important - l..l is not equal
>> to l.l; and l is not equal to l.  I am working on dividing your
>> numbers and numbering your primes.  it's very complicated, since every
>> number can be considered prime, not prime, integer and irrational.
>> remember there is at least one more root to every equation than what
>> you previously thought, for example there are at least pie square
>> roots of the number pie.
>>
>> Update: moved my blog to http://www.speedy.net/uri/blog/ .  I decided
>> to remove other content from this website.
>>
>> [o-o-o-oo-o-o-o][o-o-o-oo-o-o-o]
>> - This message is confidential -
>> [o-o-o-oo-o-o-o][o-o-o-oo-o-o-o]
>>
>> =
>> To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
>> the word "unsubscribe" in the message body, e.g., run the command
>> echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il
>>
>>
>
>
> --
> 
> 
>



-- 
Uri Evenhen Mor (Ore)
Mobile Phone: +972-50-9007559
E-mail: u...@speedy.net
Blog: http://www.speedy.net/uri/blog/

Now working on version l.l of the pie - defined as o/o or olo or lol.
I discovered the number of dots is very important - l..l is not equal
to l.l; and l is not equal to l.  I am working on dividing your
numbers and numbering your primes.  it's very complicated, since every
number can be considered prime, not prime, integer and irrational.
remember there is at least one more root to every equation than what
you previously thought, for example there are at least pie square
roots of the number pie.

Update: moved my blog to http://www.speedy.net/uri/blog/ .  I decided
to remove other content from this website.

[o-o-o-oo-o-o-o][o-o-o-oo-o-o-o]
- This message is confidential -
[o-o-o-oo-o-o-o][o-o-o-oo-o-o-o]

=
To unsubscribe, send mail to linux-il-requ...@cs.huji.ac.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-requ...@cs.huji.ac.il