Problems executing scripts
I'm a complete novice and I'm trying to write a script that will upon selection either:
1. Show the current directory
2. Delete a file
3. Rename a file
This is what I've tried, with no success:
Using vi I created filepro
#!/bin/ksh
cat <<++
MAIN MENU
1) Print current working directory
2) Delete file in current directory
3) Rename file in current directory
++
echo Please enter your selection $LOGNAME:
Chmod 755 filepro
./filepro
Everything appears fine:
MAIN MENU
1) Print current working directory
2) Delete file in current directory
3) Rename file in current directory
Please enter your selection LNOWE:
Until I enter my selection, when selecting 1 I should get the directory instead I get:
1: not found
I’ve tried adding and removing spaces in the main menu. I tried #!bin/bash, #!bin/sh. Adding and removing space between cat <<++.
This is obviously a simple straight forward script. But I can’t seem to get it right. Please help. Thanks!
Sorry if this is not formated properly, haven't figured out the forum posting yet.
|