tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
11
Task/Pangram-checker/UNIX-Shell/pangram-checker.sh
Normal file
11
Task/Pangram-checker/UNIX-Shell/pangram-checker.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
function pangram? {
|
||||
local alphabet=abcdefghijklmnopqrstuvwxyz
|
||||
local string="$*"
|
||||
string="${string,,}"
|
||||
while [[ -n "$string" && -n "$alphabet" ]]; do
|
||||
local ch="${string%%${string#?}}"
|
||||
string="${string#?}"
|
||||
alphabet="${alphabet/$ch}"
|
||||
done
|
||||
[[ -z "$alphabet" ]]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue