changeset 2329:bfeb9841fc0a

<Jafet> (echo \'#!/bin/sh\'; echo \'a() { p=$(echo -n $(ps -p $1 -oppid | tail -1)); if ps -p $p -ocmd | tail -1 | egrep -q "^sh -c .* \\| cat\\$"; then ps -p $1 -ocmd | tail -1; else a $p; fi }\'; echo \'q=$(a $$); if echo "$q" | grep -q "^bash -c"; then echo "$q" | sed "s/^bash -c/\\`run/"; elif echo "$q" | grep -q "^/bin/sh /hackenv/bin/"; then echo "$q" | sed "s,^/bin/sh /hackenv/bin/,\\`,"; else echo \\`"$q"; fi\') > bin/quine2
author HackBot
date Fri, 01 Mar 2013 02:28:03 +0000
parents d85907fd544f
children 07b96602ced0
files bin/quine2
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/quine2	Fri Mar 01 02:25:29 2013 +0000
+++ b/bin/quine2	Fri Mar 01 02:28:03 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 "^sh -c env .* \| cat\$"; then ps -p $1 -ocmd | tail -1; else a $p; fi }
+a() { p=$(echo -n $(ps -p $1 -oppid | tail -1)); if ps -p $p -ocmd | tail -1 | egrep -q "^sh -c .* \| cat\$"; then ps -p $1 -ocmd | tail -1; else a $p; fi }
 q=$(a $$); if echo "$q" | grep -q "^bash -c"; then echo "$q" | sed "s/^bash -c/\`run/"; elif echo "$q" | grep -q "^/bin/sh /hackenv/bin/"; then echo "$q" | sed "s,^/bin/sh /hackenv/bin/,\`,"; else echo \`"$q"; fi