Typing a shell and executing

I am using Knoppix and I would like to type the shell script.  I created a directory named Cars and then did the command

cat Cars

(shell is typed here)

esac....

How do I run this program from this location?
HiganteAsked:
Who is Participating?
 
Kim RyanIT ConsultantCommented:
You need to have the executable permsion bit set. Try typing
chmod 755 Cars

The you should be able to just type Cars or ./Cars to run the script.Note the first line of your script should start with something like  #!/bin/sh
Otherwise you will need to say
sh Cars
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.