RE: Sed, awk?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: shrike-list-admin@xxxxxxxxxx 
> [mailto:shrike-list-admin@xxxxxxxxxx] On Behalf Of Ed Greshko
> Sent: Thursday, December 18, 2003 1:09 AM
> To: Shrike List
> Subject: RE: Sed, awk?
> 
> 
> On Thu, 2003-12-18 at 13:56, Jake McHenry wrote:
> > Thanks! Would there be a way to get them all on one line instead
of 
> > many, seperated by a space for input to another command? Being
they 
> > are all on their own lines, it's kind of messy for input to
another 
> > command.
> 
> Sorry, I don't know what you mean when you say "be a way to 
> them all..."  what is "them"?  You told us what was going to 
> be passed to the "command" (in my case cut) and I'm assuming 
> it would be passed as STDIN.  I used "echo" to simulate 
> whatever is generating the data.
> 
> 
> > Jake McHenry
> > Nittany Travel MIS Coordinator
> > http://www.nittanytravel.com
> > 
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: shrike-list-admin@xxxxxxxxxx
> > > [mailto:shrike-list-admin@xxxxxxxxxx] On Behalf Of Ed Greshko
> > > Sent: Thursday, December 18, 2003 12:46 AM
> > > To: Shrike List
> > > Subject: Re: Sed, awk?
> > > 
> > > 
> > > On Thu, 2003-12-18 at 13:10, Jake McHenry wrote:
> > > > This is probably really simple for u guys.. I need a 
> one liner to
> > > > basically do the same as explode in php. Here is the 
> input to the
> > > > command:
> > > > 
> > > > Oneliner | grep 'whatever' *
> > > > 
> > > > What will be actually being passed to sed or whatever will
look
> > like
> > > > this:
> > > > 
> > > > 203lkjasdf:alsdkfjalskjf
> > > > 
> > > > I only need the first part, before the colon. I could make up
a
> > php
> > > > script very easly explode(":", $input); but I would like to
> > > just have
> > > > a short command instead of a separate script.
> > > 
> > > cut -f 1 -d :
> > > 
> > > example...
> > > 
> > > $ echo "203lkjasdf:alsdkfjalskjf" | cut -f 1 -d : 203lkjasdf
> > > 
> > > --
> > > "An opinion is like an asshole - everybody has one."
> > >     - Clint Eastwood as Harry Callahan, The Dead Pool - 1988.
> > > 
> > > 
> > > --
> > > Shrike-list mailing list
> > > Shrike-list@xxxxxxxxxx 
> > > https://www.redhat.com/mailman/listinfo/shrike> -list
> > > 
> -- 
> "An opinion is like an asshole - everybody has one."
>     - Clint Eastwood as Harry Callahan, The Dead Pool - 1988.
> 
> 
> -- 
> Shrike-list mailing list
> Shrike-list@xxxxxxxxxx 
> https://www.redhat.com/mailman/listinfo/shrike> -list
> 

grep 'alsdjf' * | cut -f 1 -d :

Returns all the filenames:what I'm searching for, growing rapidly,
right now the line count is around 200. What I want to do with this
output is input it into a script I made, which contains sa-learn
--args.. $*, where $* is the output from grep and cut.

I need the output from grep and cut to be all on the same line, not
the 200+ as it currently is.

So, is there a way to have the output from grep and cut to be all on
one big line seperated by spaces?


Thanks,
Jake


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux