[plug] A bit of gross bash code

Kai vk6ksj at siwa.com.au
Wed Mar 7 17:57:45 WST 2001


Brad,

Dunno if anyone else has the same problem, and I know it's a niggly one, but
anyone else get greg's signature like this:

>                    /"\
> Save the Forests   \ /     ASCII RIBBON CAMPAIGN
> Burn a Greenie.     X      AGAINST HTML MAIL
>                    / \

instead of like this:

>                                 /"\
> Save the Forests   \ /     ASCII RIBBON CAMPAIGN
> Burn a Greenie.     X      AGAINST HTML MAIL
>                                 / \

or is it just me?

----- Original Message -----
From: "Brad Campbell" <brad at seme.com.au>
To: <plug at plug.linux.org.au>
Sent: Wednesday, March 07, 2001 5:30 PM
Subject: Re: [plug] A bit of gross bash code


> The Thought Assassin wrote:
> >
> > On Wed, 7 Mar 2001, The Thought Assassin wrote:
> > > ls -ln /dev|grep "^[c|b|u]" |
> > > sed 's/^\(.\)......... *\([0-9]*\) *\([0-9]*\) *\([0-9]*\)
*\([0-9]*\)\, *\([0-9]*\)..............\(.*\)$/\1:\3:\4:\5:\6:\7/'
> >
> > It occurs to me that your mailreader will probably linewrap this at a
> > convenient space character. Don't cut+paste and leave that space
character
> > out, or it will not work as intended.
> >
> > -Greg
>
> Thanks to both Tony and Greg for the ideas..
> I'm off to read up on regular expressions..
> I knew there had to be a better way to do it, I now have a basic
understanding
> of grep, sed, tr and awk, although the latter I'm still working on.
> I have a feeling that once I get on top of regexps it will all fall into
place.
> Maybe thats a good topic for a plug talk one night.
> One good source of bash code I have found to disassemble is debian boot
scripts.
>
> Thanks again all, I'll be sure to post another basic question some time in
the
> near future..
>
> --
> Brad....
>                    /"\
> Save the Forests   \ /     ASCII RIBBON CAMPAIGN
> Burn a Greenie.     X      AGAINST HTML MAIL
>                    / \
>
>




More information about the plug mailing list