how to building a shell script?

Can somebody tell me which document will help me to create a script file
which can run in the shell,I want to know the grammer,the rules and the
structure of a QNX script file?
Thanks in advance
Best Regards
ChaoLi

sorry,I find it is in the helpviewer-ksh,sorry for having posted the topic
here.
ChaoLi

“ChaoLi” <qnx_new@sohu.com> wrote in message
news:9qhk2h$a6v$1@inn.qnx.com

Can somebody tell me which document will help me to create a script file
which can run in the shell,I want to know the grammer,the rules and the
structure of a QNX script file?
Thanks in advance
Best Regards
ChaoLi

Two things are necessary.

  1. use chmod to turn on the execute bit(s) for your script file
  2. the first “line” must contain ‘#!’ followed by the name of the program to
    process the script.

I.E. The first line is usually:
#!/bin/sh
or
#!/bin/ksh

The first two bytes of the file must be “#!”. You must specify the full
path of the utility. There must be no other bytes on the line.

Notice that if you can use any program to process your file. If you have a
“myProgram” that read a certain type of script file, you can put:
#!/pathname/myProgram
as the first line of your text file. Then you can just type the name of the
text file and the OS will read the first line and load the designated
program with the file as it’s first argument.

Good Luck


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net