From d55b01983f213735a9c50f7752ebed39c2b34c68 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Wed, 6 Jul 2022 22:00:23 -0500 Subject: [PATCH] print its own code --- bash/quine.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bash/quine.sh diff --git a/bash/quine.sh b/bash/quine.sh new file mode 100644 index 0000000..b897294 --- /dev/null +++ b/bash/quine.sh @@ -0,0 +1,10 @@ +u () +{ + type u | { + read; + IFS= read -rd '' func; + printf %s "$func" + }; + printf u +} +u \ No newline at end of file