aboutsummaryrefslogtreecommitdiff
path: root/man/man1/shb.1df
blob: b6b0182c21da379251518ce7ad20245cfc226ccb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.TH SHB 1df "August 2016" "Manual page for shb"
.SH NAME
.B shb
\- insert a shebang line above a file
.SH SYNOPSIS
.B shb
bash < foo.bash > foo
.br
cat *.sed |
.B shb
sed -f > sedbatch
.SH DESCRIPTION
.B shb
searches the system paths to find a suitable program with the name given in its
first argument, forms a "shebang" line from it and any remaining arguments, and
then emits the contents of stdin.
.P
This is intended as a minimal way to make portable shebang lines for Makefiles
or other building or installation frameworks, handling subtleties like sed(1)
being located in /bin on Linux, but /usr/bin on BSD.  It should work with any
POSIX-compliant sh(1).
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>