Skip to main content
deleted 27 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Bash 4.2 + extras, 2324 exit codes

grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 grep#2C-#2 C/#3 sed#4 C-x/#5 C_#6 C0#7 man /#16 C-f#22 C-o/#23 C-L3#35 C--capath /#60 C--max-filesize 1#63 C--cacert /#77 timeout 1e-9 w#124 /#126 -#127 T6\;#132 T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 T0\;#139 exit _#255 

Thanks to @Ken Y@KenY-N for 3 exit codes.

The last one's borderline, but since exit underscore Thanks to @el.pescado for 1 exit code. fails because of its non-numeric argument, I think it should count.

Verification

All tests have been performed on openSUSE 13.2.

$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 

Bash 4.2 + extras, 23 exit codes

grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 grep#2 C/#3 sed#4 C_#6 C0#7 man /#16 C-f#22 C-o/#23 C-L3#35 C--capath /#60 C--max-filesize 1#63 C--cacert /#77 timeout 1e-9 w#124 /#126 -#127 T6\;#132 T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 T0\;#139 exit _#255 

Thanks to @Ken Y-N for 3 exit codes.

The last one's borderline, but since exit underscore fails because of its non-numeric argument, I think it should count.

Verification

$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 

Bash 4.2 + extras, 24 exit codes

grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 C-#2 C/#3 sed#4 C-x/#5 C_#6 C0#7 man /#16 C-f#22 C-o/#23 C-L3#35 C--capath /#60 C--max-filesize 1#63 C--cacert /#77 timeout 1e-9 w#124 /#126 -#127 T6\;#132 T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 T0\;#139 exit _#255 

Thanks to @KenY-N for 3 exit codes. Thanks to @el.pescado for 1 exit code.

Verification

All tests have been performed on openSUSE 13.2.

$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 
deleted 27 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Bash 4.2 + extras, 23 exit codes

grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 grep#2 C/#3 sed#4 C_#6 C0#7 man /#16 C-f#22 C-o/#23 C-L3#35 C--capath /#60 C--max-filesize 1#63 C--cacert /#77 timeout 1e-9 w#124 /#126 -#127 T6\;#132 T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 T0\;#139 exit _#255 

Thanks to @Ken Y-N for 3 exit codes.

The last one's borderline, but since exit underscore fails because of its non-numeric argument, I think it should count.

I will golf this later.

Verification

$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 

Bash 4.2 + extras, 23 exit codes

grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 grep#2 C/#3 sed#4 C_#6 C0#7 man /#16 C-f#22 C-o/#23 C-L3#35 C--capath /#60 C--max-filesize 1#63 C--cacert /#77 timeout 1e-9 w#124 /#126 -#127 T6\;#132 T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 T0\;#139 exit _#255 

Thanks to @Ken Y-N for 3 exit codes.

The last one's borderline, but since exit underscore fails because of its non-numeric argument, I think it should count.

I will golf this later.

Verification

$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 

Bash 4.2 + extras, 23 exit codes

grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 grep#2 C/#3 sed#4 C_#6 C0#7 man /#16 C-f#22 C-o/#23 C-L3#35 C--capath /#60 C--max-filesize 1#63 C--cacert /#77 timeout 1e-9 w#124 /#126 -#127 T6\;#132 T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 T0\;#139 exit _#255 

Thanks to @Ken Y-N for 3 exit codes.

The last one's borderline, but since exit underscore fails because of its non-numeric argument, I think it should count.

Verification

$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 
deleted 129 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Bash 4.2 + extras, 23 exit codes

grep -Po\#$1$ "$0|sed 's:#.*(?=#$1$)"::;s:T:tcc $0|sh;exit-run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 grep#2 curl C/#3 sed#4 curl _#6C_#6 curl 0#7C0#7 man /#16 curl C-f to/!#22f#22 curl to C-o/#23 curl C-L3 x.org#35L3#35 curl C--capath / -L x.org#60#60 curl C--max-filesize 1 to#631#63 curl C--cacert / -L x.org#77#77 timeout 1e-9 w#124 /#126 -#127 tcc -run -<<<main=6\;#132T6\;#132 tcc -run -<<<main=204\;#133T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 tcc -run -<<<main\;#139T0\;#139 exit _#255 

Note that the to domain no longer resolves to an IP.

Thanks to @Ken Y-N for 3 exit codes.

The last one's borderline, but since exit underscore fails because of its non-numeric argument, I think it should count.

I will golf this later.

Verification

$ for n in {0..255}; do bash exit.sh $n ;$n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 

Bash 4.2 + extras, 23 exit codes

grep -Po ".*(?=#$1$)" $0|sh;exit man#1 grep#2 curl /#3 sed#4 curl _#6 curl 0#7 man /#16 curl -f to/!#22 curl to -o/#23 curl -L3 x.org#35 curl --capath / -L x.org#60 curl --max-filesize 1 to#63 curl --cacert / -L x.org#77 timeout 1e-9 w#124 /#126 -#127 tcc -run -<<<main=6\;#132 tcc -run -<<<main=204\;#133 $[2**63%-1]#136 {0..1000000000}#137 tcc -run -<<<main\;#139 exit _#255 

Note that the to domain no longer resolves to an IP.

Thanks to @Ken Y-N for 3 exit codes.

The last one's borderline, but since exit underscore fails because of its non-numeric argument, I think it should count.

I will golf this later.

Verification

$ for n in {0..255}; do bash exit.sh $n ; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 

Bash 4.2 + extras, 23 exit codes

grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit man#1 grep#2 C/#3 sed#4 C_#6 C0#7 man /#16 C-f#22 C-o/#23 C-L3#35 C--capath /#60 C--max-filesize 1#63 C--cacert /#77 timeout 1e-9 w#124 /#126 -#127 T6\;#132 T204\;#133 $[2**63%-1]#136 {0..1000000000}#137 T0\;#139 exit _#255 

Thanks to @Ken Y-N for 3 exit codes.

The last one's borderline, but since exit underscore fails because of its non-numeric argument, I think it should count.

I will golf this later.

Verification

$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null 0 1 2 3 4 6 7 16 22 23 35 60 63 77 124 126 127 132 133 136 137 139 255 
deleted 11 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 1 character in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 32 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 171 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 22 characters in body
Source Link
Addison Crump
  • 11.3k
  • 1
  • 45
  • 91
Loading
added 47 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
edited body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 37 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 37 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 40 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 47 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 760 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 21 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 86 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 21 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 21 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 10 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 2 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 9 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 1 character in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 33 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
deleted 3 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading