Re: which is the best command to use

2012-01-05 Thread weimen
于 2012-1-4 19:26, Wilko Fokken 写道: On Tue, Dec 27, 2011 at 08:57:55PM +0800, lina wrote: Hi, I have two questions, wish to get advice, Question 1: For a series of files: cat a_*.o* | grep "WARNING" some file like a_1.o12 has WARNING, but others does not have WARNING How can I let grep ret

Re: which is the best command to use

2012-01-04 Thread Wilko Fokken
On Tue, Dec 27, 2011 at 08:57:55PM +0800, lina wrote: > Hi, > > I have two questions, wish to get advice, > > Question 1: > > For a series of files: > > cat a_*.o* | grep "WARNING" > > some file like a_1.o12 has WARNING, but others does not have WARNING > > How can I let grep returns the filename?

Re: which is the best command to use

2011-12-27 Thread Bill Dennen
On Tue, 27 Dec 2011 14:20:02 +0100, lina scribbled: > On Tuesday 27,December,2011 08:57 PM, lina wrote: >> Hi, >> >> I have two questions, wish to get advice, >> >> Question 1: >> >> For a series of files: >> >> cat a_*.o* | grep "WARNING" >> >> some file like a_1.o12 has WARNING, but others does

Re: which is the best command to use

2011-12-27 Thread Bill Dennen
On Tue, 27 Dec 2011 14:20:02 +0100, lina scribbled: > On Tuesday 27,December,2011 08:57 PM, lina wrote: >> Hi, >> >> I have two questions, wish to get advice, >> >> Question 1: >> >> For a series of files: >> >> cat a_*.o* | grep "WARNING" >> >> some file like a_1.o12 has WARNING, but others does

Re: which is the best command to use

2011-12-27 Thread lina
On Tuesday 27,December,2011 09:51 PM, Tony Baldwin wrote: On Tue, Dec 27, 2011 at 09:11:45PM +0800, lina wrote: On Tuesday 27,December,2011 08:57 PM, lina wrote: Hi, I have two questions, wish to get advice, Question 1: For a series of files: cat a_*.o* | grep "WARNING" some file like a_1

Re: which is the best command to use

2011-12-27 Thread Raf Czlonka
On Tue, Dec 27, 2011 at 01:19:20PM GMT, Andrei Popescu wrote: > To answer the question in your subject I think the correct command to > use is 'man' :) Well put, sir! +1 ;^) Regards, -- Raf -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Tro

Re: which is the best command to use

2011-12-27 Thread Raf Czlonka
On Tue, Dec 27, 2011 at 12:57:55PM GMT, lina wrote: > Hi, > > I have two questions, wish to get advice, > > Question 1: > > For a series of files: > > cat a_*.o* | grep "WARNING" It's one of the useless uses of cat[0]. Use: % grep WARNING a_*.o* instead. > some file like a_1.o12 has WARNI

Re: which is the best command to use

2011-12-27 Thread Tony Baldwin
On Tue, Dec 27, 2011 at 09:11:45PM +0800, lina wrote: > On Tuesday 27,December,2011 08:57 PM, lina wrote: > >Hi, > > > >I have two questions, wish to get advice, > > > >Question 1: > > > >For a series of files: > > > >cat a_*.o* | grep "WARNING" > > > >some file like a_1.o12 has WARNING, but other

Re: which is the best command to use

2011-12-27 Thread lina
On Tuesday 27,December,2011 09:19 PM, Andrei Popescu wrote: On Ma, 27 dec 11, 20:57:55, lina wrote: Hi, I have two questions, wish to get advice, Question 1: For a series of files: cat a_*.o* | grep "WARNING" Useless use of 'cat' (grep can open files) some file like a_1.o12 has WARNING,

Re: which is the best command to use

2011-12-27 Thread Andrei Popescu
On Ma, 27 dec 11, 20:57:55, lina wrote: > Hi, > > I have two questions, wish to get advice, > > Question 1: > > For a series of files: > > cat a_*.o* | grep "WARNING" Useless use of 'cat' (grep can open files) > some file like a_1.o12 has WARNING, but others does not have WARNING > > How c

Re: which is the best command to use

2011-12-27 Thread lina
On Tuesday 27,December,2011 08:57 PM, lina wrote: Hi, I have two questions, wish to get advice, Question 1: For a series of files: cat a_*.o* | grep "WARNING" some file like a_1.o12 has WARNING, but others does not have WARNING How can I let grep returns the filename? I wrote a very-low-

which is the best command to use

2011-12-27 Thread lina
Hi, I have two questions, wish to get advice, Question 1: For a series of files: cat a_*.o* | grep "WARNING" some file like a_1.o12 has WARNING, but others does not have WARNING How can I let grep returns the filename? Question 2: ls . | xargs -i -t cp ./{} {}.bak How does xargs work,

Re: which is the best command to use

2011-12-23 Thread Chris Davies
lina wrote: > Thanks cool. a derived question, > for a.txt: > 1 a > 2 a > 3 a > for b.txt > 1 b > 2 b > 3 b > what if I only interested the 2 filed. > namely > a b > a b > a b Are the 1, 2, 3 relevant? So if you had this, what would you expect as your output - a.txt 1 a 2 b 3 c b.txt 1 d 2

Re: which is the best command to use

2011-12-23 Thread André Berger
* lina (2011-12-23): [...] > File_a.txt > a > a > a > > File_b.txt > b > b > b > > I wish to get a file_ab.txt as > a b > a b > a b apt-get install coreutils paste File_a.txt File_b.txt -André -- L'art d'ennuyer est de tout dire. [Voltaire] -- To UNSUBSCRIBE, email to debian-user-requ...@l

Re: which is the best command to use

2011-12-23 Thread lina
On Fri, Dec 23, 2011 at 4:13 PM, Roman Khomasuridze wrote: > You can use paste, and/or join. for you particular example > paste -d ' ' a.txt b.txt > ab.txt > will work Thanks cool. a derived question, for a.txt: 1 a 2 a 3 a for b.txt 1 b 2 b 3 b what if I only interested the 2 filed. namely a

Re: which is the best command to use

2011-12-23 Thread Roman Khomasuridze
You can use paste, and/or join. for you particular example paste -d ' ' a.txt b.txt > ab.txt will work Regards -- Roman On Fri, Dec 23, 2011 at 12:07 PM, Arno Schuring wrote: > > > > well, I have two files: > > > > File_a.txt > > a > > a > > a > > > > File_b.txt > > b > > b > > b > > > > I wis

RE: which is the best command to use

2011-12-23 Thread Arno Schuring
> > well, I have two files: > > File_a.txt > a > a > a > > File_b.txt > b > b > b > > I wish to get a file_ab.txt as > a b > a b > a b > man 1 paste Regards,Arno

which is the best command to use

2011-12-22 Thread lina
Hi, (How are you all?) well, I have two files: File_a.txt a a a File_b.txt b b b I wish to get a file_ab.txt as a b a b a b I tried, but still don't know which is the best way to do it, Thanks ahead and wish all have a nice holiday, Best regards, -- To UNSUBSCRIBE, email to debian-user-r