
로그인쉘: 로그인시 처음 실행되는 쉘
서브쉘: 따로 실행하는 쉘
즉 스크립트 처음에 시작하는 "#!/bin/bash" 라는 구문은 셔뱅(#!),서브쉘을 실행시키는 것이다.
#! /bin/zsh
#: Usage : parameters-exam.sh arg1 arg2 arg3
echo "The script name: $0"
echo "The first argument: $1"
echo "The second argument: $2"
echo "The number of arguments: $#"
echo "The list of arguments: $@"
echo "The list of argumnets: $*"
parameter-test.sh red blue로 스크립트 실행시

와 같이 나온다.
ex) echo <옵션><메시지>
-n : 메시지 출력후 newline 문자를 추가하지 않는다.
-e : backslash escapes(아래 같은 지시어)문자를 해석하여 특별한 의미를 지정한다.
\t TAb키
\n 줄바꿈
\a alert(bell)
echo "Your time is up"
echo "Your time is up" > time.txt
echo -n "Name:"
echo -e "First\tSecond"
-t : 지정된 시간안에 입력 받는다
-s : silent mode로 입력하는 글자가 보이지 않는다.(비밀번호 같이 보안상황에 유용하다)

만약 변수는 2개인데, 데이터는 3개를 입력받을 경우는?

두번째 변수에 나머지 값이 모두 입력된다.
Example
$ read name
$ read -t10 -n8 password
$ read -t10 -n8 -s password
$ read
$ echo -n "Name:"; read name
$ echo $name
print format <메시지>
%d or %i 숫자
%s 문자열
%f 실수형 숫자
$ printf "Hello linux shell\n"
$ printf "Name: %s \t Score: %i\n" junyoung 100
$ today='date +%Y%m%d'
$ printf "date is %s\n" "$today"
$ printf "number is %.3f\n" 20
$ printf "|%10s|%10s|%10.2f\n" ubuntu junyoung 10