aboutsummaryrefslogtreecommitdiff
path: root/bin/tmpname
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-08-13 13:17:45 -0300
committerEuAndreh <eu@euandre.org>2022-08-13 13:17:45 -0300
commita2324725adab4fda610d39eb21d8d28bdf8f35ba (patch)
treeb8d770e51d7e0703020cfd6862e890b717bcb23e /bin/tmpname
parentbin/player: Add working utility (diff)
downloaddotfiles-a2324725adab4fda610d39eb21d8d28bdf8f35ba.tar.gz
dotfiles-a2324725adab4fda610d39eb21d8d28bdf8f35ba.tar.xz
bin/: Add examples to help strings
Diffstat (limited to 'bin/tmpname')
-rwxr-xr-xbin/tmpname14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/tmpname b/bin/tmpname
index d83fc87..89d7e4d 100755
--- a/bin/tmpname
+++ b/bin/tmpname
@@ -15,10 +15,24 @@ help() {
Options:
-h, --help show this message
+
Generate a temporary name.
+
+
+ Examples:
+
+ Create a temporary file:
+
+ $ OUT="$(tmpname)"; touch "$OUT"; cmd > "$OUT"
+
+
+ `cd` into a temporary directory:
+
+ $ DIR="$(tmpname)"; mkdir -p "$DIR"; cd "$DIR"
EOF
}
+
for flag in "$@"; do
case "$flag" in
--)