The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: listing files along with grep -v
@X-I-N@
Newbie
Rank: 1



UID 33
Digest Posts 0
Credits 0
Posts 41
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 19, 2007 01:24 PM  Profile | P.M. 
listing files along with grep -v



listing files along with grep -v



when i run the command ls | grep -v snmp it outputs all the files into one column. how can i list them in multiple columns?


Top
JMonster
Newbie
Rank: 1



UID 205
Digest Posts 0
Credits 0
Posts 40
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 19, 2007 01:25 PM  Profile | P.M. 
quote:
originally posted by charlie11k
when i run the command ls | grep -v snmp it outputs all the files into one column. how can i list them in multiple columns?



for ksh:


code:
ls !(*snmp*)

for bash:


code:
Top
goscript
Newbie
Rank: 1



UID 162
Digest Posts 0
Credits 0
Posts 27
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 19, 2007 01:25 PM  Profile | P.M. 
sorry, these are directories. when i run the command you suggest, it lists all the directories and their files. is there a command to list just the directories?
Top
johno12345
Newbie
Rank: 1



UID 9
Digest Posts 0
Credits 0
Posts 25
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 19, 2007 01:26 PM  Profile | P.M. 
quote:
originally posted by charlie11k
sorry, these are directories. when i run the command you suggest, it lists all the directories and their files. is there a command to list just the directories?
Top
astrovineet
Newbie
Rank: 1



UID 61
Digest Posts 0
Credits 0
Posts 27
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 19, 2007 01:26 PM  Profile | P.M. 
what would be the syntax for csh?
Top
Visage
Newbie
Rank: 1



UID 24
Digest Posts 0
Credits 0
Posts 57
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 19, 2007 01:26 PM  Profile | P.M. 
why csh?
don't know if csh (and variants) supports extended globbing ...
Top
 

 

All times are GMT, the time now is Jul 31, 2010 03:28 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.005445 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP