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

So what have you written/figuredout so far?

That looks like a 'clear spec' to me - starting with 'Create a program to ... ' :wink:

Definitely you should show us what have you tried so far.

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

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

Please do read the rules of the forum. ( that is the first thing you should do )

Please do not bump up posts if they are not answered.

That's a good start: you have converted the spec to pseudo code. Now you have to convert the pseudocode to shell code.

If you are having problems doing that, post the code you have written so far with an explanation of what is not working. Post any error messages you get.