Hi, I'm a complete novice to Linux and UNIX. I'm having trouble getting a script to execute properly. I did a similar script earlier in the semester with no problems. For whatever reason I can't get this one to work. Any help would be greatly appreciated as I'm completely lost and frustrated at this point!I apologize in advance if I don't use proper terms, I'm not familiar with all the technical jargon yet!
I created a script using vi, named filepro
This is the format we need to use:
#!/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:
I made it executable with:
Chmod 755 filepro
./filepro
Everything appears to be to be correct
When I type in filepro I get:
MAIN MENU
1) Print current working directory
2) Delete file in current directory
3) Rename file in current directory
Please enter your selection LNOWE:
No matter what I select 1-3
I get an error message:
1: not found 2: not found etc...
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!
Lewis and Clark Community College, Godfrey, IL, US
Prof Rick Burgess, CNET 200 Intro to UNIX and Linux.