[plug] A bit of gross bash code
The Thought Assassin
assassin at live.wasp.net.au
Wed Mar 7 16:58:03 WST 2001
On Wed, 7 Mar 2001, The Thought Assassin wrote:
> ls -ln /dev|
> grep "^[c|b|u]" |tr -s " ", ":"|cut -d: -f1,3,4,5,6,10 |cut -c1,11-
> one caveat is that it will choke on filenames with spaces or colons.
This ought to fix the spaces and colons problem, but it's _way_ ugly. :)
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/'
-Greg Mildenhall
More information about the plug
mailing list