Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2000 10:59:32 -0400 (EDT)
From:      Chris BeHanna <behanna@zbzoom.net>
To:        FreeBSD-Stable <stable@freebsd.org>
Subject:   Re: "set -A" Bourne script - a nogo on FreeBSD
Message-ID:  <Pine.BSF.4.21.0009151058510.38564-200000@acs-24-154-28-99.zoominternet.net>
In-Reply-To: <20000914225233.A1971@nc.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--YZ5djTAD1cGYuMQK
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.BSF.4.21.0009151058512.38564@acs-24-154-28-99.zoominternet.net>
Content-Disposition: INLINE

On Thu, 14 Sep 2000, Randall Hopper wrote:

> 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.

    You need to install ksh to use set -A.

--
Chris BeHanna
Software Engineer (at yourfit.com)
behanna@zbzoom.net


--YZ5djTAD1cGYuMQK
Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-ID: <Pine.BSF.4.21.0009151058513.38564@acs-24-154-28-99.zoominternet.net>
Content-Description: 
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?Pine.BSF.4.21.0009151058510.38564-200000>