Created
May 19, 2018 21:45
-
-
Save AfroThundr3007730/3482b2e59e5aaea01315c91a0117adad to your computer and use it in GitHub Desktop.
Show the number of args in a command. Useful for troubleshooting word splitting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
printf "%d args:" $# | |
printf " <%s>" "$@" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put it in your
$PATH
, then call it before a command:Found it here.