krebs shell: add cat

This commit is contained in:
tv 2015-08-28 20:11:03 +02:00
parent 015720ef89
commit f6997378c9

View File

@ -12,4 +12,11 @@ rec {
if isSafeChar c then c
else if c == "\n" then "'\n'"
else "\\${c}");
#
# shell script generators
#
# example: "${cat (toJSON { foo = "bar"; })} | jq -r .foo"
cat = s: "printf '%s' ${escape s}";
}