![]()
#!/bin/sh
#ascii-series: produce a series of digits from 1, given an upper limit
#note: chr was part of /rdb; but this works without it, anyway!
PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/rdb/bin
progname=`basename $0`
case $# in
0) 1>&2 echo $progname: usage $progname limit ; exit 1;;
esac
index=$1
while [ "0$index" -gt 0 ]
do
echo $index
# chr $index
index=`expr "$index" - 1`
done
#!/bin/sh
#series: produce a series of digits from 1, given an upper limit
PATH=/bin:/usr/bin:/usr/local/bin
progname=`basename $0`
case $# in
0) 1>&2 echo $progname: usage $progname limit; exit 1 ;;
esac
count=$1
index=1
while [ "0$index" -le $count ]
do
echo $index
index=`expr "$index" + 1`
done
#!/bin/sh
printf "\033]0;$1\007"
#!/bin/sh
#sound.volume: change the volume on the soundcard
case $1 in
"") 2>&1 echo "sound.volume: need volume level; bailing out"; exit 1 ;;
esac
/usr/local/bin/mixer -master=$1,$1 -dsp=$1,$1 -mic=0,0 -line=0,0
echo '' |
awk '
BEGIN {
srand();
}
{
limit = limit + 0;
if (limit == 0)
limit = 2;
sides = sides + 0;
if (sides == 0)
sides = 6;
for (i=1;i<=limit;i++)
printf("%s ", 1+int(rand()*sides));
printf("\n");
}
' limit=$1 sides=$2
[back to Scripts index] [back to Linux, Unix, etc] [Main Site] [Weblog]
Contents licensed under the GPL