|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Simplest of shell scripts not working
I'm trying to write my first shell script and find that even something as simple as this doesn't work:
script file name is: test.sh script file location is: ~/bin script code is: #!/bin/sh echo "Hello world" I did a "chmod 755 test.sh" on the file cd to the ~/bin directory and get the following when trying to run the command: [computer:~] testuser% ./test.sh ./test.sh: Command not found. Are there any special shell-script related quirks to be aware of in OS 10.2.6? (Note: also did a echo $PATH and my /bin directory is listed so the system shouldn't have any trouble locating the script right?) Thanks for any help, Ken |
|
#2
|
|||
|
|||
|
After much headscratching on this one, it turns out that the problem was caused by Mac style line enders rather than Unix line enders. Once the line enders were changed, everything worked fine.
Hope this helps someone else... |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Simplest of shell scripts not working |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|