- Article pages now have a discussion option at the bottom (moderated/captcha, but no registration needed) - recently upgraded to a newer Dokuwiki version, please report problems

Print argument list for testing

snipplet:
debug,
arguments
LastUpdate:
2010-07-31
Contributor:
Snappy (IRC)
type:
snipplet

Sometimes you might find it useful to see how arguments passed to a program arrive there.

Check this script (save it as script file or make a function):

printf '"%b"\n' "$0" "$@" | nl -v0 -s": "

It uses the printf command to generate a list of arguments, even with escape sequences interpreted. This list is shown formatted by the nl(1) utility.

Discussion

Enter your comment
 
snipplets/prargs.txt · Last modified: 2011/06/24 07:10 by thebonsai
GNU Free Documentation License 1.3
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0