File: ishcat

package info (click to toggle)
aish 1.13-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 304 kB
  • ctags: 449
  • sloc: ansic: 3,692; makefile: 129; sh: 21
file content (24 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
if [ -z "$1" ];then
	echo 'exit=CTRL-D'
	stty -echo;aish -;stty echo
	exit 0
fi
type=-7
for name in $@; do
	case $name in
		-s*|-7|-8|-n|-u) type=$name;;
		-*)	echo "usage: ishcat [-{7|8|s|n|u}] [files ..]"
			aish -v
			exit 0;;
		*)	arg="$arg $name";;
	esac
done
if [ -n "$arg" ];then
#	exec aish -o - $type $arg 2>/dev/null
	TMPFILE=$HOME/aish$$.tmp
	aish -o - $type $arg 2> $TMPFILE
	cat $TMPFILE
	rm -f $TMPFILE
fi
# aish 1.10 by H.Ogasawara(COR.)