Sponsored Content
Top Forums Shell Programming and Scripting Unix Shell Scripting Standards Post 302112714 by jim mcnamara on Thursday 29th of March 2007 05:13:13 PM
Old 03-29-2007
It will probably work if /bin/ksh is a link to zsh. This is common on a lot of our Linux boxes here.

What CFA J & I are telling you is that the best practice is to use the magic at the top of your script. But you do not have guarantees what shell you will invoke, especially when the code is ported. So, on the internet, that becomes very true - like porting into a black hole. So, #!/bin/ksh may not mean what you think.

Consider reading the link in the above post if you're confused about standards.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix Coding Standards

Hi, I am looking for some coding standards for Unix Shell Scripting. Can anyone help me out in this? Regards, Himanshu (3 Replies)
Discussion started by: himanshu_s
3 Replies

2. UNIX IEEE Std 1003.1-2001 (POSIX.1)

Link to the Open Group (UNIX Standards)

Click HERE to learn about The Single UNIX Specification, Version 3 Or: Here is another link to the UNIX IEEE Standard, an Open Group Technical Standard, Issue 7 Keywords UNIX® is a registered trademark of The Open Group (0 Replies)
Discussion started by: Neo
0 Replies

3. Programming

UNIX version standards

I'm new to UNIX programming. I'm used to starting my program's versions at 1.0, but I look at all the UNIX programs out there and see things like 0.000.1 or 3.3.000 and I'm wondering what these things really mean. Do people just type anything they feel in there? Are things in pre-release... (6 Replies)
Discussion started by: hirni
6 Replies

4. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

5. Shell Programming and Scripting

Unix shell scripting

Hi, we are writing this fields dynamically retrieved from database and writing into the file. $bmpRec = $bmpRec.'|'.$cust_id; # sp4 $bmpRec = $bmpRec.'|'.$serv_id; # sp5 $bmpRec = $bmpRec.'|'.$site_id; # sp6 $bmpRec = $bmpRec.'|'.$loc_id; # sp7 ... (4 Replies)
Discussion started by: Maruthi Kunnuru
4 Replies

6. Shell Programming and Scripting

Unix Shell Scripting

Hi All, Greetings!! I am trying to write a script that will get me the syslog.log file output of last week... That is ...my cron will run on Monday and will get me the syslog output of previous week , last monday-last sunday. I tried using date formatting and tail..but did not succeed.... (4 Replies)
Discussion started by: premamadhuri
4 Replies

7. UNIX for Advanced & Expert Users

Need your Help on Unix Shell Scripting.........

Hi Friends, 1. Bash Shell Scrpt to take backup at evening 2. I need a bash shell script for killing all processes. (5 Replies)
Discussion started by: vinayraj
5 Replies

8. Shell Programming and Scripting

Secure coding standards for Shell Programming

Hi, Can anyone point me to Secure coding standards for shell programming guides, links etc etc... Thanks and regards, Vamsi K Surampalli. (2 Replies)
Discussion started by: vamsisurampalli
2 Replies

9. UNIX for Dummies Questions & Answers

Unix Shell Scripting( Calling from Unix to PLSQL)

Hello Experts, I have the following questions to be discussed here at this esteemed discussion forum. I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies
SHCOMP(1)						    User Environment Utilities							 SHCOMP(1)

NAME
shcomp - compile a ksh93 shell script SYNOPSIS
shcomp [ options ] [infile] [outfile]] ORIGIN OF THIS MAN PAGE
This man page was written by Christophe Martin <Schplurtz@free.fr> for the Debian GNU/Linux system. It is based on "shcomp --man" output. DESCRIPTION
Unless -D is specified, shcomp takes a shell script, infile, and creates a binary format file, outfile, that ksh93 can read and execute with the same effect as the original script. Since aliases are processed as the script is read, alias definitions whose value requires variable expansion will not work correctly. If -D is specified, all double quoted strings that are preceded by $ are output. These are the messages that need to be translated to locale specific versions for internationalization. If outfile is omitted, then the results will be written to standard output. If infile is also omitted, the shell script will be read from standard input. OPTIONS
-D, --dictionary Generate a list of strings that need to be placed in a message catalog for internationalization. -n, --noexec Displays warning messages for obsolete or non-conforming constructs. -v, --verbose Displays input from infile onto standard error as it reads it. --man Displays this man page on standard error and exits. --help Shows a short help message and exits. EXIT STATUS
0 Successful completion. >0 An error occurred. DEBIAN WARNING
On a Debian GNU/Linux system, more than one package may provide ksh. the output of shcomp can only be used by ksh93. Any other ksh will be unable to run the compiled script. EXAMPLE
( echo '#! /bin/ksh93' ; shcomp myscript ) > myscript.bin && chmod 755 myscript.bin ./myscript.bin SEE ALSO
ksh(1) IMPLEMENTATION
version shcomp (AT&T Labs Research) 2003-03-02 author David Korn <dgk@research.att.com> copyright Copyright (c) 1982-2005 AT&T Corp. license http://www.opensource.org/licenses/cpl1.0.txt KSH93 Fri Jun 3 2005 SHCOMP(1)
All times are GMT -4. The time now is 07:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy