aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.markdown1
-rw-r--r--bash/bashrc.d/pan.bash6
2 files changed, 7 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 9bfce28e..0ec67b44 100644
--- a/README.markdown
+++ b/README.markdown
@@ -184,6 +184,7 @@ There are a few other little tricks in `bash/bashrc.d`, including:
* `mkcp` — Create a directory and copy arguments into it
* `mkmv` — Create a directory and move arguments into it
* `pa` — Print given arguments, one per line
+* `pan` — Print given arguments separated by NULL chars
* `path` — Manage the contents of `PATH` conveniently
* `pd` — Change to the argument’s parent directory
* `scr` — Create a temporary directory and change into it
diff --git a/bash/bashrc.d/pan.bash b/bash/bashrc.d/pan.bash
new file mode 100644
index 00000000..14cd3625
--- /dev/null
+++ b/bash/bashrc.d/pan.bash
@@ -0,0 +1,6 @@
+# Print arguments, null-delimited; you will probably want to write this into a
+# file or as part of a pipeline
+pan() {
+ printf '%s\0' "$@"
+}
+