Re: Dumb Q
Re: Dumb Q
- Subject: Re: Dumb Q
- From: Marco Masser <email@hidden>
- Date: Thu, 7 Aug 2008 01:12:39 +0200
I want to make a simple filter that takes the output of "ls -la" and
reformats it to appear more like the MS-DOS directory listing. So, I
would do something like "ls -la | mydosfilter" and get a directory
listing with the filename first, the # bytes second, then the
timestamp (leaving out everything from the UNIX permissions bits to
the group, and rearranging the rest.)
Why don't you simply add an alias named "dir" to a global bashrc file
that translates to something like this: ls -la | awk '{ print $9"\t
\t"$5"\t"$6,$7,$8 }'
This simply outputs the file name, two tabs, the size in bytes, a tab
and then the date & time. I'm no awk expert, maybe this could be done
prettier.
Marco
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Dumb Q (From: William Squires <email@hidden>) |