Shell scripts starting with "#"

Peter da Silva peter at ficc.ferranti.com
Sun Oct 21 04:05:23 AEST 1990


So if you do:

	#!/bin/sh
	: || exec /bin/sh $0 $argv:q
	(alias) >/dev/null 2>&1 && exec /bin/sh $0 "$@"

It'll work for the bourne shell, the korn shell, and the c shell, whether
or not you have #! working. Geeze.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter at ferranti.com



More information about the Comp.unix mailing list