UNIXオペレーションII 課題1 (99ad0524)

提出されたスクリプト(kadai1.sh)

set 

実行結果

引数が2つの場合

# ls
test.1.iff
test.2.iff
test.3.iff
test.4.iff
test.5.iff
# csh kadai1.sh test tmp
argv	(test tmp)
cdpath	(.. /home/abe)
cwd	/home/abe/school/manual/cgi-bin/csh-kadai1/testdir/chkdir
home	/home/abe
host	friendly
myinclude	/home/abe/usr/include
mylib	/home/abe/usr/lib
path	(. /bin /usr/etc /usr/bin/X11 /usr/bin /usr/local/bin /usr/bin/mh /usr/local/netscape /root/pds/jdk1.1.5/jdk1.1.5/bin /home/abe/rvplayer5.0 /home/abe/bin)
shell	/bin/csh
status	0
term	screen
user	abe
# ls
test.1.iff
test.2.iff
test.3.iff
test.4.iff
test.5.iff

引数が3つの場合

# ls
xyz.1.iff
xyz.2.iff
xyz.3.iff
xyz.4.iff
xyz.5.iff
# csh kadai1.sh 3 test tmp
argv	(3 xyz abc)
cdpath	(.. /home/abe)
cwd	/home/abe/school/manual/cgi-bin/csh-kadai1/testdir/chkdir
home	/home/abe
host	friendly
myinclude	/home/abe/usr/include
mylib	/home/abe/usr/lib
path	(. /bin /usr/etc /usr/bin/X11 /usr/bin /usr/local/bin /usr/bin/mh /usr/local/netscape /root/pds/jdk1.1.5/jdk1.1.5/bin /home/abe/rvplayer5.0 /home/abe/bin)
shell	/bin/csh
status	0
term	screen
user	abe
# ls
xyz.1.iff
xyz.2.iff
xyz.3.iff
xyz.4.iff
xyz.5.iff