When I run `ls -d1 *` I get all files and directories that don't start with dot, `ls -d1 */` gives me only directories that don't start with dot. I want to list all directories in the current folder only, this might not be the best command to do that but it works. In my case the slashes do matter as I'm using the output in a script.

I've added a pipe through sed to remove the additional slash in my script but I'm still curious why the output is different.

Thanks


On 29/09/2011 15:36, Korek wrote:
1) Why are you doing */ ? the slash is useless. In case you would need to list dirs starting with "V" you need only `*ls -dl V**`

2) For linux, multiple slashes does not matter - you can try `cd //////home////////` and you will see.

Z


On 09/29/2011 08:04 AM, i...@whywouldwe.com wrote:
When I do `ls -d1 */` on my mac I get
      dir1/
      dir2/

but on an Ubuntu server (fish installed
via apt-get) I get
      dir1//
      dir2//

Does anyone know how to fix this? Or
even where the problem lies?

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to