Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Commonmark migration
Source Link

#Bash, 45 42 bytes

Bash, 45 42 bytes

41 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
{ [ ${1//[^$i${i^}]} ]
}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If the input string contains every English letter, we will reach the end of the program, thus exiting with 0 (true).

#Bash, 45 42 bytes

41 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
{ [ ${1//[^$i${i^}]} ]
}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If the input string contains every English letter, we will reach the end of the program, thus exiting with 0 (true).

Bash, 45 42 bytes

41 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
{ [ ${1//[^$i${i^}]} ]
}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If the input string contains every English letter, we will reach the end of the program, thus exiting with 0 (true).

added 4 characters in body
Source Link
Toby Speight
  • 7k
  • 1
  • 30
  • 43

#Bash, 45 42 bytes

41 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
{ [ ${1//[^$i${i^}]} ]
}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If the input string contains every English letter, we will reach the end of the program (thus, thus exiting with 0 (true)), the input string contains every English letter.

#Bash, 45 42 bytes

41 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
{ [ ${1//[^$i${i^}]} ]
}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If we reach the end of the program (thus exiting with 0 (true)), the input string contains every English letter.

#Bash, 45 42 bytes

41 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
{ [ ${1//[^$i${i^}]} ]
}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If the input string contains every English letter, we will reach the end of the program, thus exiting with 0 (true).

Clarify where input comes from. Bash accepts `{` and `}` in place of `do` and `done`
Source Link
Toby Speight
  • 7k
  • 1
  • 30
  • 43

#Bash, 4545 42 bytes

4441 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
do{ [ ${1//[^$i${i^}]} ]
done}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If we reach the end of the program (thus exiting with 0 (true)), the input string contains every English letter.

#Bash, 45 bytes

44 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
do [ ${1//[^$i${i^}]} ]
done

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like)

This assumes a locale where the lower-case English letters are contiguous.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If we reach the end of the program (thus exiting with 0 (true)), the input string contains every English letter.

#Bash, 45 42 bytes

41 byte program, plus 1 because it must be invoked with bash -e:

for i in {a..z}
{ [ ${1//[^$i${i^}]} ]
}

Amazingly, I managed a Bash answer with no quote characters! (yes, I checked with inputs beginning with -f and the like).

This assumes a locale where the lower-case English letters are contiguous from a to z. Input is via the first argument to the program.

The way this works is, for each alphabetic letter $i, we test whether the string contains $i or its upper-case equivalent ${i^} by removing all other characters. If this results in the empty string, then the input did not contain that letter, and we exit with 1 (false). If we have a non-empty result, then we passed the test and move on to the next letter. If we reach the end of the program (thus exiting with 0 (true)), the input string contains every English letter.

Source Link
Toby Speight
  • 7k
  • 1
  • 30
  • 43
Loading