Re: [dev] Re: [dev] [dev] Usage, -h, --help, help, synopsis, …

From: pancake <pancake_AT_youterm.com>
Date: Sat, 21 Aug 2010 11:12:26 +0200

80 or 78? :)

Sent from my iPod

On Aug 21, 2010, at 2:59 AM, Noah Birnel <nbirnel_AT_gmail.com> wrote:

> On Thu, Aug 19, 2010 at 11:06:40AM -0700, Suraj Kurapati wrote:
>> On Tue, Aug 17, 2010 at 7:54 PM, Suraj Kurapati <sunaku_AT_gmail.com>
>> wrote:
>> Alternatively, in simple shell scripts (for which writing a manpage
>> would be overkill), I simply print the script file's comment header
>> using sed(1):
>>
>> #!/bin/sh
>> # your program description & usage documentation here
>> # nicely formatted and beautified to fit 80 columns
>> # NOTE: the blank line below is the end of the file comment header
>>
>> # check command-line usage
>> if test "$#" -lt 3; then
>> sed -n '2,/^$/s/^# \?//p' "$0" # show this file's comment header
>> exit 1
>> fi
>
> That is beautiful.
>
> -Noah
>
Received on Sat Aug 21 2010 - 11:12:26 CEST

This archive was generated by hypermail 2.2.0 : Sat Aug 21 2010 - 11:24:02 CEST