06-24-2017 05:42 PM
I have a shell script in unix whose name is : batching.csh
Here is the code inside this file:
#!/bin/ksh cd /Program_Directory/ sas prog_1.sas &
My problem is when I run this script it told me "Command not found"
xnzspap23x-tcsh-23$ batching.csh batching.csh: Command not found.
This is my first time create a shell script in unix, please help me!
06-24-2017 05:43 PM
First figure out the command line that you need directly in Unix.
Then you incorporate those into a sh file that you call from Unix and test
Then you test it in SAS.
Which step are you on now?
06-26-2017 02:04 AM
I would not use something as crude as Windows Notepad for programming work (which inlcudes shell scripting).
Actually, I still use vi for scripts
- is available on ALL UNIX platforms with the same syntax
- works even over a simple telnet connection, as it does not need any function keys/mousing around/etc
- can edit files of arbitrary size, although it might change to line mode with sufficiently large files.
If you are working on UNIX from Windows, I recommend using notepad++, as it can write text files in UNIX mode (LF instead of CRLF), provides a hex display mode, and lots of other features that are helpful when writing any type of code.
06-24-2017 06:04 PM