[arch-general] OT: dash - looping through alphabet
Ralf Mardorf
ralf.mardorf at rocketmail.com
Sat Jul 5 16:44:20 EDT 2014
Hi!
Sorry, it's OT for this list, but I didn't find an answer in the
Internet.
What's the syntax for a loop from "a" to "z" in dash?
[rocketmouse at archlinux src]$ cat for-bash
#!/bin/bash
for str in {a..z} ; do printf "$str"; done
printf "\n"
exit
[rocketmouse at archlinux src]$ cat for-dash
#!/bin/dash
for str in {a..z} ; do printf "$str"; done
printf "\n"
exit
[rocketmouse at archlinux src]$ ./for-bash
abcdefghijklmnopqrstuvwxyz
[rocketmouse at archlinux src]$ ./for-dash
{a..z}
Regards,
Ralf
More information about the arch-general
mailing list