hp@ubuntu:~/shel$ printf "%s %d\t%s" "Hi world" 15 person
Hi world 15 person
#!/bin/bash
echo the date is $(date)
set $(date)
echo The month is $2
exit 0
#!/bin/bash
#filename = shift1.sh
while [ "$1" != "" ]; do
echo "$1"
shift
done
exit 0
输出 :
hp@ubuntu:~/shel$ ./shift1.sh 123 asd sdf we 8
123
asd
sdf
we
8