GOTCHA in Ubuntu - broken shell

Chip Marshall chip at 2bithacker.net
Mon Oct 1 12:42:51 EDT 2007


On October 01, 2007, Tom Buskey sent me the following:
> If you want bash or ksh, use #!/bin/bash or #!/bin/ksh.  If it doesn't exist
> in /bin, put it there where it belongs.

Coming from a primarily FreeBSD background, I'm against the idea of
putting bash in /usr/bin. In my world, /usr is for programs included
with the operating system distribution, and /usr/local is for locally
added programs, like bash.

For a solution to the pathing problem, usually in the case of perl, I've
seen people use "#!/usr/bin/env perl" which will find a perl in $PATH
and execute it, though this breaks for people who like to give command
line arguments as part of a #! on some OSes.

A little searching turns up a pretty good Wikipedia page on the subject:
	http://en.wikipedia.org/wiki/Shebang_(Unix)

-- 
Chip Marshall <chip at 2bithacker.net>     http://kyzoku.2bithacker.net/
GCM/IT d+(-) s+:++ a26>? C++ UB++++$ P+++$ L- E--- W++ N@ o K- w O M+
V-- PS+ PE Y+ PGP++ t+@ R@ tv@ b++@ DI++++ D+(-) G++ e>++ h>++ r-- y?


More information about the gnhlug-discuss mailing list