Hi List,

Maybe I've been hackin at this a wee bit too long, but I just can't seem to figure out why this command isn't performing just the way its supposed. At any rate I'm working on a bash script to run my tape back up and I want "ls" to load all the directory names into a variable which I then intend to step through with a for statement looking for a specific value. However, "ls" doesn't appear to be returning JUST directory names when this command is issued:

ls -d /home/mdw1982/*

The output returned looks like this:

[mdw1982@mdw1982 bin]$ ls -d ../*
../arc_1/ ../gpg.tgz ../mp3/ ../temp/
../arc_2/ ../Iptables.zip ../newln~* ../Templates
../bin/ ../java_examples.tgz ../procmail/ ../tmp/
../configs/ ../mail/ ../procmail.old ../Trash
../DEADJOE ../mdw1982.asc ../procmailrc-temp ../trolls_text
../dead.letter ../mdw1982_public.asc ../procmailrc-temp~ ../trolls_text~
../Drafts ../mdw1982_secret.asc ../rpm/ ../virus/
../Empire/ ../micq/ ../Sent ../webdev
../fetchmailrc.tgz ../moron_response ../Sent Items ../www/


As you can see it's returning everything that is in the directory instead of just the directory names present in that directory.

Any ideas...comments...epiphanies?

thanks,

Mark


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Reply via email to