print its own code

This commit is contained in:
Nick Chambers 2022-07-06 22:00:23 -05:00
parent 91e97fb8b4
commit d55b01983f
1 changed files with 10 additions and 0 deletions

10
bash/quine.sh Normal file
View File

@ -0,0 +1,10 @@
u ()
{
type u | {
read;
IFS= read -rd '' func;
printf %s "$func"
};
printf u
}
u