Operating System - HP-UX
1827757 Members
2900 Online
109969 Solutions
New Discussion

Number or characters interpreted by kernel after #! in script

 
Robert S. White
Advisor

Number or characters interpreted by kernel after #! in script

In regards to writing a script file(Perl or shell) on an HP 9000; the first line of a program declares the program/shell to use through the use of the "shebang" (#!). Various switches/flags/options can also be passed to the script to configure it on this line.
How many characters will the kernel interpret before it stops? I would like to know this answer for HP-UX 10.20 and HP-UX 11.X. I would appreciate a reference as well.
Computers are just external storage for my brain.
1 REPLY 1
Bruce Regittko_1
Esteemed Contributor

Re: Number or characters interpreted by kernel after #! in script

Hi,

From the exec(2) man page on a HP-UX 11.00 box,

If the initial line of the script file exceeds a system-defined maximum number of characters,
exec*() fails. The minimum value for this limit is 32.

I don't know what the "system-defined maximum number of characters" is but I would say that it is the same as the maximum number of characters on a command line.

--Bruce
www.stratech.com/training