Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ls --list only directorys (solved)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Wed Dec 12, 2007 5:43 am    Post subject: Reply with quote

denstark wrote:
Only in linux would there be 64 ways to list only the directories.


At least this isn't another "How many ways can you remove whitespace from a filename". We could start into the scripts to list only directories...
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
timeBandit
Administrator
Administrator


Joined: 31 Dec 2004
Posts: 2667
Location: here, there or in transit

PostPosted: Wed Dec 12, 2007 3:15 pm    Post subject: Reply with quote

"I don't use {directories|scripts|whitespace}, you insensitive clod!"
I can't decide which best applies (and at least two are untrue). :P
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1026
Location: (44.057116, -123.103394)

PostPosted: Wed Dec 12, 2007 3:42 pm    Post subject: Reply with quote

Code:
#!/usr/bin/perl
my @dirs = glob("*/");
foreach (@dirs){ print "$_\n"; }

_________________
Do you still use Perl?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum