Exforsys
+ Reply to Thread
Results 1 to 2 of 2

To run my Shell

This is a discussion on To run my Shell within the Shell Programming forums, part of the Operating Systems category; I have a small shell script named as test.sh which I wanted to run. But when I give sh test.sh ...

  1. #1
    caradoc is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    122

    To run my Shell

    I have a small shell script named as test.sh which I wanted to run. But when I give
    sh test.sh
    It is not working.
    I am sure there is nothing wrong in this shell script because I could run it by using . ./test.sh
    Why is it not running in my previous case?


  2. #2
    psiva_exforsys is offline Junior Member Array
    Join Date
    Jun 2007
    Answers
    8

    To run a shell script

    to run the shell script in unix prompt before that we should change the file mode to rwx for ugo using chmod 777 <filename.extn>. and other things if you wnat run a korn shell then you simply run the script using shellscriptname with extension (eg: sample.ksh) and in borne shell you can run the script using sh shellscript name with extenstion (eg : sh sample.sh).


Latest Article

Network Security Risk Assessment and Measurement

Read More...