# HG changeset patch # User HackBot # Date 1362104883 0 # Node ID bfeb9841fc0a7eb6bcf9e3ae47e53350b582496b # Parent d85907fd544f4e49f59d379a53a2a238fe6745a6 (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 diff -r d85907fd544f -r bfeb9841fc0a bin/quine2 --- 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