![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help writing this unix script | wiggles | Shell Programming and Scripting | 2 | 12-12-2008 12:28 PM |
| writing script in UNIX for copying files in two server | REKHA09 | Shell Programming and Scripting | 4 | 09-07-2008 02:07 PM |
| Perl Unix Script Writing | Dinkster | UNIX for Dummies Questions & Answers | 1 | 02-01-2008 04:09 PM |
| Writing and executing a script in RTR implementation of UNIX | mahajan.anubhav | Shell Programming and Scripting | 0 | 03-16-2006 05:20 AM |
| Need help in writing a unix script | pray44u | Shell Programming and Scripting | 1 | 03-30-2005 08:15 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
need help writing this unix script
Create an executable script file called "newname" that will perform the followings:
1. Rename a file upon the user’s request. If the file exists, prompt the user for confirmation before renaming the file. The screen should prompt the user for a. "Name of file you want to rename." Use the "\c" escape character. b. "New name of file" Use the "\c" escape character. c. "File Exist" to avoid overriding a file. d. "File $oldname changed to $newname" e. "Do you want to rename another file?" If the user selects "yes" the system should refresh the screen and if the user selects "no" the system should exit to the prompt sign. f. Refresh the screen to go back to the menu until the user selects the exit option |
|
||||
|
Quote:
rm -i read a file to rename if file exits then prompt the user for confirmation ask ? do you want to override this file if choice is yes (y) then ask if the user wants to rename the file read the user's choice(y/n) if the choice is yes (y) the system should refresh the screen otherwise the system will exit to the promt sign |
|
||||
|
rm -i read a file to rename if file exits then prompt the user for confirmation ask ? do you want to override this file if choice is yes (y) then ask if the user wants to rename the file read the user's choice(y/n) if the choice is yes (y) the system should refresh the screen otherwise the system will exit to the promt sign |
![]() |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|