Re: Q for Unix guru's
From: Alan Connor (xxxxxx_at_xxxx.xxx)
Date: 07/26/03
- Previous message: Floyd Davidson: "Re: Q: how do I open xterm, run command, and continue manual input?"
- In reply to: Charles Demas: "Re: Q for Unix guru's"
- Next in thread: Charles Demas: "Re: Q for Unix guru's"
- Reply: Charles Demas: "Re: Q for Unix guru's"
- Reply: Walter Briscoe: "Re: Q for Unix guru's"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 26 Jul 2003 21:55:28 GMT
On Sat, 26 Jul 2003 19:42:10 +0000 (UTC), Charles Demas <demas@TheWorld.com> wrote:
>
>
> In article <594f6d6f.0307261059.17f0ceb9@posting.google.com>,
> Spider-X <yedilw@yahoo.com> wrote:
>>what combination of grep sed cat and wc would I have to use to count
>>the number of lines in a file that exceed 50 characters?
>
> grep and wc
>
>>If this is
>>easy enough, then how do I print all the lines that exceed this limit
>>to its own file?
>
> awk 'length > 50' infile > outfile
>
> This sounds so much like homework!
>
>
> Chuck Demas
>
Doesn't it....
sed -n '/................................................../p' infile > outfile
Looks silly, but works great. Less resources and faster than awk too :-)
Alan
--
For Linux/Bash users: Eliminate spam from your life
with the Mailbox-Sentry-Program. See the thread
MSP on comp.mail.misc.
- Previous message: Floyd Davidson: "Re: Q: how do I open xterm, run command, and continue manual input?"
- In reply to: Charles Demas: "Re: Q for Unix guru's"
- Next in thread: Charles Demas: "Re: Q for Unix guru's"
- Reply: Charles Demas: "Re: Q for Unix guru's"
- Reply: Walter Briscoe: "Re: Q for Unix guru's"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]