From 403baf55282557069b1fa49b95d1e70e6cc42bcc Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 6 Jan 2017 11:40:14 +1300 Subject: Add jfp(1df) --- man/man1/jfp.1df | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 man/man1/jfp.1df (limited to 'man') 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 -- cgit v1.2.3