Re: ls lacking a feature?
- From: "John W. Krahn" <someone@xxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 02:21:33 GMT
Richard Heathfield wrote:
Bernard Liang said:
Well,
...you just want the directory name, not all the gubbins, so you thought
you'd try:
ls -l | grep ^d | tr -s ' ' | cut -d' ' -f9
This is slightly shorter:
ls -al | grep ^d | awk '{ print $9 }'
In my version of ls -l the file name is the eighth field and those don't work
very well if the names have spaces in them.
John
--
use Perl;
program
fulfillment
.
- Follow-Ups:
- Re: ls lacking a feature?
- From: Richard Heathfield
- Re: ls lacking a feature?
- References:
- ls lacking a feature?
- From: Bernard Liang
- Re: ls lacking a feature?
- From: Richard Heathfield
- Re: ls lacking a feature?
- From: Bernard Liang
- Re: ls lacking a feature?
- From: Richard Heathfield
- ls lacking a feature?
- Prev by Date: Re: Any online source management for personal projects ?
- Next by Date: Re: ls lacking a feature?
- Previous by thread: Re: ls lacking a feature?
- Next by thread: Re: ls lacking a feature?
- Index(es):