Date: Thu, 14 Sep 2000 22:52:34 -0400 From: Randall Hopper <aa8vb@nc.rr.com> To: freebsd-stable@FreeBSD.ORG Subject: "set -A" Bourne script - a nogo on FreeBSD Message-ID: <20000914225233.A1971@nc.rr.com>
next in thread | raw e-mail | index | archive | help
--YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I pulled this off "ASCII chart" script off UNIX Tip of the Day. It worked fine at work on IRIX, but no such luck here on FreeBSD at home. Seems FreeBSD's Bourne shell's "set" command doesn't support -A. Randall --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=ascii_chart #! /bin/sh # Shell script to generate all characters from # \0000 to \0377 (octal format) # Created by Declan.Forde@bk.bosch.de loop1='0 1 2 3' loop2='0 1 2 3 4 5 6 7' set -A array 0 1 2 3 4 5 6 7 echo " ${array[0]} ${array[1]} ${array[2]} ${array[3]} \ ${array[4]} ${array[5]} ${array[6]} ${array[7]} " echo for i in $loop1; do for j in $loop2; do echo "$i$j \0$i$j${array[0]} \0$i$j${array[1]} \ \0$i$j${array[2]} \0$i$j${array[3]} \0$i$j${array[4]} \ \0$i$j${array[5]} \0$i$j${array[6]} \0$i$j${array[7]}" done done echo echo " ${array[0]} ${array[1]} ${array[2]} ${array[3]} \ ${array[4]} ${array[5]} ${array[6]} ${array[7]} " echo --YZ5djTAD1cGYuMQK-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000914225233.A1971>