[CentOS] Real sh? Or other efficient shell for non-interactive scripts

Mon Apr 27 09:54:51 UTC 2015
Joerg Schilling <Joerg.Schilling at fokus.fraunhofer.de>

Valeri Galtsev <galtsev at kicp.uchicago.edu> wrote:

>
> ########
> #!/bin/sh
>
> readlink /proc/$$/file
> ########
>
> ( note that that "file" is because I'm using FreeBSD /proc, for Linux you
> may need to replace the line with something like:
>
> readlink /proc/$$/exe

And on a platform that implements a correct procfs-2, you should look at:

	/proc/self/path/a.out
or
	/proc/$$/path/a.out

This seems to be unknown e.g. to people from the FSF, so many autoconf tests 
are wrong.

Jörg

-- 
 EMail:joerg at schily.net                    (home) Jörg Schilling D-13353 Berlin
       joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'