aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-06 11:40:14 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-06 11:44:30 +1300
commit403baf55282557069b1fa49b95d1e70e6cc42bcc (patch)
treebfb81e9613bf287fbea118389f956a97354c009e /man
parentFix some misdirections (diff)
downloaddotfiles-403baf55282557069b1fa49b95d1e70e6cc42bcc.tar.gz
dotfiles-403baf55282557069b1fa49b95d1e70e6cc42bcc.zip
Add jfp(1df)
Diffstat (limited to 'man')
-rw-r--r--man/man1/jfp.1df39
1 files changed, 39 insertions, 0 deletions
diff --git a/man/man1/jfp.1df b/man/man1/jfp.1df
new file mode 100644
index 00000000..6e9e18f2
--- /dev/null
+++ b/man/man1/jfp.1df
@@ -0,0 +1,39 @@
+.TH JFP 1df "January 2017" "Manual page for jfp"
+.SH NAME
+.B jfp
+\- print input, excluding any shebang on the first line
+.SH SYNOPSIS
+.B jfp
+FILE [FILE2 ...]
+.br
+.B jfp
+< FILE
+.P
+#!/usr/bin/env jfp
+.br
+All this content will be printed verbatim,
+.br
+except for the first line,
+.br
+because it's a shebang.
+.SH DESCRIPTION
+.B jfp
+prints all the input given to it except for the first line if it starts with a
+shebang "#!". This means it can be used in a shebang to simply echo the entire
+remaining contents of the script.
+.SH NOTES
+Can you guess what it stands for?
+.P
+A portable way to do the same thing could be using a heredoc with cat(1):
+.P
+ #!/bin/sh
+ cat <<'EOD'
+ All this content will be printed verbatim...
+ ...except for the first line...
+ ...because it's a shebang.
+ EOD
+.P
+The only snag there is having to check the token word doesn't appear in the
+document.
+.SH AUTHOR
+Tom Ryder <tom@sanctum.geek.nz>