The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
shell script to delete directories... Stephan Shell Programming and Scripting 5 05-16-2008 05:11 AM
How to delete files in UNIX using shell script theguy16 Shell Programming and Scripting 7 04-09-2008 01:40 AM
shell script for delete old files krishnarao Shell Programming and Scripting 1 07-07-2006 07:21 AM
need some help with a script to delete directories. centrino Shell Programming and Scripting 1 12-12-2005 05:33 PM
Need Help: Delete a file by Shell Script r3edi Shell Programming and Scripting 5 07-11-2005 04:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8 (permalink)  
Old 05-16-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
The double awks are wasteful, though.

Code:
find . -type d | awk -F "/" '!/\.\/200/ { print $2 }'
Note also that 200* in a regular expression means 20 or 200 or 2000 or 20000 or ...
Reply With Quote
Forum Sponsor
  #9 (permalink)  
Old 05-18-2008
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,099
Stumble this Post!
Moving the thread to "Shell scripting" as requested by OP.

bakunin
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0