I am currently learning to use awk myself but i think a silmple

$ ls -all -F | grep /$ | awk -F/ '{print $8}'
                             ^^^

sets the seperator to / instead of whitespace. if this doesnt work try

$ ls -all -F | grep /$ | awk '{print $8}'|awk -F/ '{print $1}'

and that should about do it off the top of my head,

At 13:44 29/06/00 +0000, Andrew Kae wrote:
Hello,

I am trying to list all the directories in a directory and put it into a file.

So far I have :
$ ls -all -F | grep /$ | awk '{print $8}'
./
../
.netscape/
mail/

which almost gives me what i want but i need to get rid of that / at the end, can someone help me out?

If anyone has an easier way, can you let me know?

Thanks



PS. I feel a little embarrased asking such a simple question but o well =)
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


--
Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null



Reply via email to