Code Golf: Code Golf: Difference between revisions

Content added Content deleted
m (sh -> UNIX_Shell)
m (UNIX_Shell -> bash since UNIX_Shell already exists and it's code does not run on bash)
Line 480: Line 480:
Note: Run BASIC is an interpreter, it does not generate executables.
Note: Run BASIC is an interpreter, it does not generate executables.


=={{header|UNIX_Shell}}==
=={{header|Bash}}==
{{works with|bash}}
{{works with|UNIX_Shell}}
The directly executable source code is 14 bytes by using its script name instead of character literals:
The directly executable source code is 14 bytes by using its script name instead of character literals:
<syntaxhighlight lang="sh">echo -n ${0:2}</syntaxhighlight>
<syntaxhighlight lang="sh">echo -n ${0:2}</syntaxhighlight>