# HG changeset patch # User HackBot # Date 1362104474 0 # Node ID 3f8c4de90983c73e7276af97320849c49ccb02c9 # Parent 4f9fbae64db73a91f8973d37fb6e43016f6652c5 (echo \'#!/bin/sh\'; echo \'a() { p=$(echo -n $(ps -p $1 -oppid | tail -1)); if ps -p $p -ocmd | tail -1 | egrep -q " \\| cat\\$"; then ps -p $1 -ocmd | tail -1; else a $p; fi }\'; echo \'q=$(a $$); echo -n "$q" | hd; if echo "$q" | grep -q "^bash -c"; then echo "$q" | sed "s/^bash -c/\\`run/"; elif echo "$q" | grep -q "^/bin/sh"; then echo "$q" | sed "s,^/bin/sh,\\`,"; else echo \\`"$q"; fi\') > bin/quine2 diff -r 4f9fbae64db7 -r 3f8c4de90983 bin/quine2 --- a/bin/quine2 Fri Mar 01 02:19:30 2013 +0000 +++ b/bin/quine2 Fri Mar 01 02:21:14 2013 +0000 @@ -1,3 +1,3 @@ #!/bin/sh a() { p=$(echo -n $(ps -p $1 -oppid | tail -1)); if ps -p $p -ocmd | tail -1 | egrep -q " \| cat\$"; then ps -p $1 -ocmd | tail -1; else a $p; fi } -q=$(a $$); echo -n "$q" | hd; if echo "$q" | grep -q "^bash -c"; then echo "$q" | sed "s/^bash -c/`run/"; elif echo "$q" | grep -q "^/bin/sh"; then echo "$q" | sed "s,^/bin/sh,`,"; else echo \`"$q"; fi +q=$(a $$); echo -n "$q" | hd; if echo "$q" | grep -q "^bash -c"; then echo "$q" | sed "s/^bash -c/\`run/"; elif echo "$q" | grep -q "^/bin/sh"; then echo "$q" | sed "s,^/bin/sh,\`,"; else echo \`"$q"; fi