![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How the first script should notify in case there is no response from second | rajusa10 | Shell Programming and Scripting | 4 | 03-19-2008 01:35 PM |
| Script needed to select and delete lower case and mixed case records | abhilash mn | Shell Programming and Scripting | 1 | 03-17-2008 08:00 AM |
| Clear Case, Awk and script | mastachef | Shell Programming and Scripting | 0 | 10-30-2007 01:11 PM |
| Swutch-Case script | rawatds | Shell Programming and Scripting | 1 | 12-02-2004 07:43 AM |
| lower case to upper case string conversion in shell script | dchalavadi | UNIX for Dummies Questions & Answers | 3 | 05-29-2002 01:07 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
case in script
Hello All,
I'll try to get it right this time lol I am trying to do some validation on my script which renames files. The ones i am struggling with are: e.g. 1. myscript myfile myfile2 (so my script changes myfile to myfile2 if myfile exists) output : myfile does not exist 2. myscript myfile myfile2 blurb cannot have anything after rename 3. myscript myfile must have name to rename2 Hope that makes sense. I'll put a bit of my code in to try to make it clearer case $# in 0) echo "nothing has been entered" exit ;; 1) echo "file none existent" exit ;; 2) echo "dosRename: $file: Can't have anything after target" exit ;; 3) echo "no new name" exit ;; *) |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|