내가이 간단한 스크립트가 있다고 가정스크립트
#! /bin/sh
if [ $# -ne 2 ]
then
echo "Usage: $0 arg1 arg2"
exit 1
fi
head $1 $2
## But this is supposed to be:
## if -f flag is set,
## call [tail $1 $2]
## else if the flag is not set
## call [head $1 $2]
그래서 '플래그'내 스크립트에 검사를 추가하는 가장 간단한 방법은 무엇입니까?
감사