<div dir="ltr"><div>How about<br>i=1; while [ $i -lt 27 ] ; do  echo -n $( echo abcdefghijklmnopqrstuvwxyz | cut -c$i); i=$(( i+1 )); done; echo<br><br></div>For me, it echoes the alphabet on one line.<br>It does use  cut(1) as an external command, but at least cut is POSIX.<br>
<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 5, 2014 at 2:04 PM, Ralf Mardorf <span dir="ltr"><<a href="mailto:ralf.mardorf@rocketmail.com" target="_blank">ralf.mardorf@rocketmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
since /bin/sh on *buntu usually is dash, my request might not be OT for<br>
this list. Unfortunately I didn't find an answer in the<br>
Internet.<br>
<br>
What's the syntax for a loop from "a" to "z" in dash?<br>
<br>
$ cat for-bash<br>
#!/bin/bash<br>
for str in {a..z} ; do printf "$str"; done<br>
printf "\n"<br>
exit<br>
<br>
$ cat for-dash<br>
#!/bin/dash<br>
for str in {a..z} ; do printf "$str"; done<br>
printf "\n"<br>
exit<br>
<br>
$ ./for-bash<br>
abcdefghijklmnopqrstuvwxyz<br>
$ ./for-dash<br>
{a..z}<br>
<br>
Regards,<br>
Ralf<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
xubuntu-users mailing list<br>
<a href="mailto:xubuntu-users@lists.ubuntu.com">xubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/xubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/xubuntu-users</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Kevin O'Gorman<br><br>programmer, n. an organism that transmutes caffeine into software.<br><span style="line-height:normal;font-variant:normal;font-size:10pt;font-style:normal;font-weight:normal"><span style="line-height:normal;font-variant:normal;font-size:10pt;font-style:normal;font-weight:normal"></span></span><table border="0" cellpadding="0" cellspacing="0" width="448">
<tbody><tr><td width="25"><img src="cid:XVHDKDFDBURW.IMAGE_60.gif" height="21" width="25"></td>
<td width="423"><span style="FONT-FAMILY:Verdana,Geneva,sans-serif;COLOR:rgb(0,153,0);MARGIN-LEFT:5px;FONT-SIZE:10px">Please consider the environment before printing this email.</span></td></tr></tbody></table><br></div>

</div>