Tue May 13
unix
Author:Noritaka
#!/bin/sh
case $# in
1) cat >>$1 ;;
2) cat $1 >>$2 ;;
*) echo "Usage: append [fromfile] tofile" 1>&2 ;;
esac
#!/bin/sh
//declare using B shell
case $# in
// $# 引数の数
1)
// 引数が1つの場合
2)
// 引数が2つの場合
*)
// 1) 2) 以外
>: update
echo "hello" > output.txt
// over write with "hello"
echo "hello" >> output.txt
// add "hello" to end of line