The UNIX and Linux Forums  

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



Thread: Case Statement
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 03-31-2004
Zeta_Acosta Zeta_Acosta is offline
Registered User
 

Join Date: Mar 2004
Posts: 14
Hi Zazzybob, thanks for the help so far! Ok to elaborate more on what I am trying to do:

Well I'm trying to create a script that looks at parameters followed by a target that that specifies either a new main part of the file name or a new extension part but not both.

Rename File1 File2 File3 *.html

So File1 to File3 are params and *.html is is the target.

Then with my loop Im trying to check the validity of them eg less than 2 params, cant have 2 dots, more than one asterisk and doesnt exist.

Then If there are no errors the files are to be renamed in another loop.

But I'm really struggling with it and Its really beginning to get on my nerves as I dont know what Im doing wrong!

Any Suggestions on how I should do it would be fantastic.

By the way, Im doing this becuase I have loads of files that I want to change extensions on and I want to do it this way because I've been trying for ages.

Again many thanks.
Reply With Quote