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
Change All File Names in a Directory andou UNIX for Dummies Questions & Answers 8 01-22-2008 05:06 PM
Command to list directory names only stevefox UNIX for Dummies Questions & Answers 6 11-29-2007 04:06 PM
directory names in a flat file surjyap Shell Programming and Scripting 2 10-06-2005 04:51 AM
File and Directory Names become hidden dbinsol1 UNIX for Advanced & Expert Users 10 05-29-2002 06:58 AM
Use of $ in directory names pkappaz UNIX for Dummies Questions & Answers 3 09-06-2001 06:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-18-2006
Registered User
 

Join Date: Oct 2005
Posts: 85
Stumble this Post!
How to sort directory names and use only last?

I need help writing a bash script for the windows cygwin environment. I'm not sure if bash is the optimal tool. Perhaps perl would be better? Either would work.

I have directories whose names include the date they were created. The directory names are in the format of "//remote/builds/SA/Build_YYYYMMDD". I need to
(1) find the directory with the latest date encoded in in it. (all the candidate directories share the same containing directory). Today, for example, I see a directory name of //remote/builds/SA/Build_20060916. Apparently someone preformed a build on Saturday.
(2) Create a directory with the name /cygdrive/c/SA20060916 if it does not already exist.
(3) Find the zip file in //remote/builds/SA/Build_20060916 that contains 'EVAL' in the file name and unzip it to /cygdrive/c/SA20060916
(4) Find the zip file in //remote/builds/SA/Build_20060916 that contains 'FS' in the file name and unzip it to /cygdrive/c/SA20060916

Thanks,
Siegfried
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:50 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