当前位置: 技术问答>linux和unix
一段shell 脚本报错 不知到错在哪
来源: 互联网 发布时间:2016-12-18
本文导语: 1 #!/bin/bash ...
1 #!/bin/bash
2 set -x
3 #del.lines
4 #script takes filename(s) and deletes all blanks
5
6 TEMP_F=/temp/del.lines.$$
7
8 usage()
9 {
10 #usage
11 echo "Usage:`basename $0` file[file..]"
12 echo "try `basename $0` -help for more infomation"
13 exit 1
14 }
15
16 if [ $# -eq 0 ];then
17 usage
18 fi
19
20 FILES=$1
21 echo $FILES
22 echo $#
23 while [ $# -gt 0 ]
24 do
25 echo "..$1"
26 case $1 in
27 -help) cat