非常感谢csdn其木王王子提供的特殊变量的讲解,和下面我实在找不到最先出处的提供大量例子的师傅,非常感谢

参数

输入语句

对谈式脚本read

shell变量除了可以直接赋值或脚本传参外,还可以使用read命令从标准输入中获得,read是bash内置命令,可以使用help read查看帮助。

read的读入功能就相当于交互式接受用户输入,然后给变量赋值。

常用参数如下:

-p: 设置提示信息。
-t:设置输入等待的时间,单位默认是秒。

使用举例
基本使用:

[root@localhost ~]# read -t 10 -p "qing shu ru:" num #读入一个输入,赋值给num,num变量前要空格。
#  -t  10则表示10秒后就超时退出
qing shu ru:34      #输入34
[root@localhost ~]# echo ${num}      #输出变量值
34
[root@localhost ~]# read -p "qing shu ru:" a1 a2    #也可以一次定义两个变量
qing shu ru:23 45
[root@localhost ~]# echo ${a1} ${a2}
23 45

需求①:
first name 与 2. last name,最后并且在屏幕上显示:“Your full name is: ”的内容:

[root@localhost ~]# vim 1.sh   #编辑脚本,内容如下#!/bin/bash
echo -e "yong lai xian shi wen jian full name:\n"
read -p "qing shu ru fir filename:" firname
read -p "qing shu ru sec filename:" secname
echo -e "\nyour full name is ${firname}${secname}."
#其中echo后面的“\n”表示换行
[root@localhost ~]# sh 1.sh      #执行脚本
yong lai xian shi wen jian full name:qing shu ru fir filename:lv           #手动输入文件名开头
qing shu ru sec filename:jian         #手动输入文件名结尾your full name is lvjian.     #它将自动将开头和结尾结合起来并输出

需求②:
假设我想要创建三个空的文件(通过touch),filename最开头由当前用户输入决定,假设使用者输入 filename 好了,那今天的日期是 2019/08/25 ,我想要以前天、昨天、今天的日期来创建这些文件。

[root@localhost ~]# vim 2.sh     #编辑脚本#!/bin/bash
echo -e "yi ci chuang jian san ge file.\n"
read -p "qing shu ru filename:" filename
filename=${filename:-file}
date1=$(date --date '1 days ago' +%Y%m%d)
date2=$(date --date '2 days ago' +%Y%m%d)
date3=$(date +%Y%m%d)
file1="${filename}${date1}"
file2="${filename}${date2}"
file3="${filename}${date3}"
touch "${file1}"
touch "${file2}"
touch "${file3}"
[root@localhost ~]# sh 2.sh   #执行脚本
yi ci chuang jian san ge file.qing shu ru filename:lv           #输入自定义的文件名开头[root@localhost ~]# find /root -name "lv*"   #查看是否创建成功
/root/lv20190825
/root/lv20190827
/root/lv20190826

需求③:
如果我们要使用者输入两个变量,然后将两个变量的内容相乘,最后输出相乘的结果。

[root@localhost ~]# vim 3.sh      #编辑脚本#!/bin/bash
echo -e "\nzhe shi yi ge suan cheng fa de jiao ben:\n"
read -p "qing shu ru yi ge shu zi:" A
read -p "qing shu ru di er ge shu zi:" B
sum=`echo "scale=4; ${A} * ${B}" | bc`
echo -e "\n${A}x${B} ==> ${sum}."
[root@localhost ~]# sh 3.sh        #执行脚本zhe shi yi ge suan cheng fa de jiao ben:qing shu ru yi ge shu zi:3        #输入第一个数
qing shu ru di er ge shu zi:4     #输入第二个数3x4 ==> 12.                           #输出的结果

测试语句

test和其标志

上面所有的测试都是通过test进行的,可以使用“[ ]”来代替,将要测试的类型及指定的名字写在“[ ]” 即可,但是中括号里面两边必须有空格。(推荐使用中括号“[ ]”)

举例:

需求①:

这个文件是否存在,若不存在则给予一个“Filename does not exist”的讯息,并中断程序;
若这个文件存在,则判断他是个文件或目录,结果输出“Filename is regular file”或“Filename is directory”
判断一下,执行者的身份对这个文件或目录所拥有的权限,并输出权限数据!

[root@localhost ~]# vim 4.sh     #编辑脚本#!/bin/bash
echo "yong lai ce shi wen jian huo dirctory."
read -p "qing shu ru yi ge wen jian ming:" filename
test -z ${filename} && echo -e "\nqing shu ru yi ge filename." && exit 0
test ! -e ${filename} && echo "filename does not exitst." && exit 0
test -f ${filename} && filetype="file"
test -d ${filename} && filetype="directory"
test -r ${filename} && prem="read"
test -w ${filename} && prem="${prem}+write"
test -x ${filename} && prem="${prem}+exe"
echo -e "\nthis is a ${filetype},it's perm.. is ${prem}."
[root@localhost ~]# sh 4.sh      #执行脚本
yong lai ce shi wen jian huo dirctory.
qing shu ru yi ge wen jian ming:/root    #输入一个目录名this is a directory,it's perm.. is read+write+exe.      #脚本执行后输出的结果
[root@localhost ~]# sh 4.sh     #再执行脚本
yong lai ce shi wen jian huo dirctory.
qing shu ru yi ge wen jian ming:/etc/passwd      #输入一个文件this is a file,it's perm.. is read+write.       #脚本执行后输出的结果

需求②:

1、当执行一个程序的时候,这个程序会让用户输入Y或N。
2、如果使用者输入Y或y时,就会显示OK,continue.
3、如果使用者输入N或n时,就会显示ON,interrupt.
4、如果不是Y/y/N/n之内的字符,那么将会死循环这个脚本,直到手动退出,或输入正确的值(其实稍作改动,可以改为若默认按回车的话可以等于输入“Y”,自行研究吧)。

[root@localhost ~]# vim 5.sh     #编辑脚本#!/bin/bash
while [ "${yn}" != "Y" -o "${yn}" != "y" -o "${yn}" != "N" -o "${yn}" != "n" ]
do
read -p "qing shu ru 'Y' or 'N':" yn
[ "${yn}" == "Y" -o "${yn}" == "y" -o "${yn}" == "" ] && echo -e "\nOK,continue." && exit 0
[ "${yn}" == "N" -o "${yn}" == "n" ] && echo -e "\nON,interrupt." && exit 0
done
[root@localhost ~]# sh 5.sh     #下面是多次执行脚本,测试是否达到需求
qing shu ru 'Y' or 'N':OK,continue.
[root@localhost ~]# sh 5.sh
qing shu ru 'Y' or 'N':yOK,continue.
[root@localhost ~]# sh 5.sh
qing shu ru 'Y' or 'N':nON,interrupt.
[root@localhost ~]# sh 5.sh
qing shu ru 'Y' or 'N':u
qing shu ru 'Y' or 'N':i
qing shu ru 'Y' or 'N':NON,interrupt.

需求③:
1、程序的文件名为何?
2、共有几个参数?
3、若参数的个数小于 2 则告知使用者参数数量太少
4、全部的参数内容为何?
5、第一个参数为何?
6、第二个参数为何

[root@localhost ~]# vim 6.sh     #编辑脚本如下#!/bin/bash
echo -e "\ncheng xu de wen jian ming shi ${0}"
echo -e "\nyi gong you $# ge can shu."
[ $# -lt 2 ] && echo "can shu tai shao le ." && exit 0
echo  "your whole parameter is ==> '$*'."
echo "the 1st parameter ${1}."
echo "the 2nd parameter ${2}."
[root@localhost ~]# sh 6.sh a b c     #执行脚本cheng xu de wen jian ming shi 6.shyi gong you 3 ge can shu.
your whole parameter is ==> 'a b c'.
the 1st parameter a.
the 2nd parameter b.
[root@localhost ~]# sh 6.sh a      #再次执行脚本cheng xu de wen jian ming shi 6.shyi gong you 1 ge can shu.
can shu tai shao le .
#为了不为难自己,上面我用了拼音,多多体谅[ 捂脸 ]。

需求④:
查看本机都是否开启了www / ftp / mail服务,并将结果直观的显示出来

[root@localhost ~]# vim 11.sh #!/bin/bash
file="/dev/shm/a.txt"
netstat -anpt  > ${file}
awk -F : '{print $4}' ${file} | awk '{print $1}' | grep "80" &> /dev/null
if [ $? -eq 0 ]thenecho -e "www service is up\n"
fi
awk '{print $4}' ${file} | egrep "20|21" &> /dev/null
if [ $? -eq 0 ]thenecho -e "ftp service is up\n"
fi
awk '{print $4}' ${file} | grep "25" &> /dev/null
if [ $? -eq 0 ]thenecho -e "mail service is up\n"
fi
[root@localhost ~]# sh 11.sh     #执行脚本测试
mail service is up[root@localhost ~]# systemctl start httpd    #启动www服务再测试
[root@localhost ~]# sh 11.sh
www service is upmail service is up

需求⑤:
都知道脚本后面的第一段是$1,第二段是$2…那么是否可以进行偏移呢,假设让原本的$2变为$1。

[root@localhost ~]# vim 7.sh      #编辑脚本如下#!/bin/bash
echo "total parameter number is ==> $#"
echo "your whole parameter is ==> $* "
shift
echo "total parameter number is ==> $#"
echo "your whole parameter is ==> $* "
shift 3
echo "total parameter number is ==> $#"
echo "your whole parameter is ==> $* "
#“上面默认的shift”参数是偏移1个位置,也可以指定偏移的参数,如“shift 3”则表示向后偏移三个
[root@localhost ~]# sh 7.sh a b c    #执行脚本,并且追加三个参数
total parameter number is ==> 3
your whole parameter is ==> a b c
total parameter number is ==> 2
your whole parameter is ==> b c
total parameter number is ==> 2
your whole parameter is ==> b c
#从输出结果可以发现,偏移是累加的,第一次偏移了默认1位,
#第二次偏移了3位,那么实际已经偏移了原始参数的4位(因为累加)
#但是参数只有三个,所以它会循环偏移,所以结果还是b和c。

条件判断语句

if

使用方法

if [条件];then做什么
elif[条件];then做什么else做什么
fi

需求①:

1、当执行一个程序的时候,这个程序会让用户输入Y或N。
2、如果使用者输入Y或y或者直接按下回车键时,就会显示OK,continue.
3、如果使用者输入N或n时,就会显示ON,interrupt.
4、如果不是Y/y/N/n之内的字符,那么将输出“I don’t know what your choice is”

[root@localhost ~]# vim 66.sh     #编写脚本#!/bin/bash
read -p "Please input (Y/N): " yn
if [ "${yn}" == "Y" -o "${yn}" == "y" -o "${yn}" == "" ];thenecho "OK, continue" exit 0
elif [ "${yn}" == "N" -o "${yn}" == "n" ];thenecho "ON, interrupt!" exit 0elseecho "I don't know what your choice is"
fi
[root@localhost ~]# sh 66.sh    #多次执行,进行测试
Please input (Y/N):
OK, continue
[root@localhost ~]# sh 66.sh
Please input (Y/N): n
ON, interrupt!
[root@localhost ~]# sh 66.sh
Please input (Y/N): dd
I don't know what your choice is

需求②:

判断192.168.1.0-10的主机存活,测试是否可以ping通,并输出IP地址对应的主机是“up”还是“down”,两种实现方法,如下:
方法1:

[root@localhost ~]# vim 8.sh     #编写脚本#!/bin/bash
i=0
network=192.168.1.
while [ ${i} -le 10 ]
doping -c 3 -i 0.2 -w 3 ${network}${i} &> /dev/null
if [ $? -eq 0 ]thenecho "host ${network}${i} is up"elseecho "host ${network}${i} is down"
filet i++
done
[root@localhost ~]# sh 8.sh      #执行脚本
host 192.168.1.0 is down
host 192.168.1.1 is down
host 192.168.1.2 is up
host 192.168.1.3 is down
host 192.168.1.4 is down
host 192.168.1.5 is down
host 192.168.1.6 is down
host 192.168.1.7 is down
host 192.168.1.8 is up
host 192.168.1.9 is down
host 192.168.1.10 is down

方法2:

[root@localhost ~]# vim 21.sh      #脚本内容如下#!/bin/bash
network="192.168.1."
for host in $(seq 1 10)
do
ping -c 1 -w 1 ${network}${host} &> /dev/null
if [ $? -eq 0 ]thenecho "${network}${host} is up."
elseecho "${network}${host} is down."
fi
done
[root@localhost ~]# sh 21.sh     #执行脚本
192.168.1.1 is down.
192.168.1.2 is up.
192.168.1.3 is down.
192.168.1.4 is down.
192.168.1.5 is down.
192.168.1.6 is down.
192.168.1.7 is down.
192.168.1.8 is up.
192.168.1.9 is down.
192.168.1.10 is down.

需求③:

1、判断 $1 是否为 hello,如果是的话,就显示 “Hello, how are you ?”;
2.、如果没有加任何参数,就提示使用者必须要使用的参数下达法;
3、 而如果加入的参数不是 hello ,就提醒使用者仅能使用 hello 为参数。

[root@localhost ~]# vim 10.sh        #编写脚本#!/bin/bash
if [ "${1}" == "hello" ]thenecho "hello,how are you ?"exit 0
elif [ "${1}" == "" ]thenecho "qing shi yong zi fu 'hello'."exit 0
elseecho "jin neng shi yong hello zi fu."
fi
[root@localhost ~]# sh 10.sh              #多次执行进行测试
qing shi yong zi fu 'hello'.
[root@localhost ~]# sh 10.sh  he
jin neng shi yong hello zi fu.
[root@localhost ~]# sh 10.sh  hello
hello,how are you ?

case

用法

case 变量 in
条件)
做什么
;;
条件)
做什么
;;
条件)
做什么
;;
esac

函数

function

使用

function aaa(){echo -n  "this is  "
}调用
aaa
aaa 1 11调用aaa,给两个个参数
函数中参数与主函数独立,如在此参数中调用$1就是1

需求①:
让使用者能够输入 one, two, three ,并且将使用者的变量以大写的方式显示到屏幕上,如果不是 one, two, three 时,就告知使用者仅有这三种选择。

[root@localhost ~]# vim 14.sh function aaa(){echo -n  "this is  "
}
case $1 in
one)
aaaecho "$1." | tr 'a-z' 'A-Z'
;;
two)
aaaecho "$1." | tr 'a-z' 'A-Z'
;;
three)
aaaecho "$1." | tr 'a-z' 'A-Z'
;;
*)echo "qing shu ru {one|two|three}."
;;
esac
[root@localhost ~]# sh 14.sh     #执行进行测试
qing shu ru {one|two|three}.
[root@localhost ~]# sh 14.sh one     #再次执行
this is  ONE.

参数独立性验证

[root@localhost ~]# vim 15.sh #!/bin/bash
function printit(){echo "Your choice is ${1}"
}
case ${1} in
"one")
printit 1 11
;;
"two")
printit 2 22
;;
"three")
printit 3 33
;;
*)
echo "Usage ${0} {one|two|three}"
;;
esac
[root@localhost ~]# sh 15.sh one    #多次执行进行测试,以便查看输出的$1是哪里的值
Your choice is 1
[root@localhost ~]# sh 15.sh two
Your choice is 2
#若将下面的变量改为$2,那么将会输出11、22、33等,发现这里的${变量}是引用的哪里的了么?
function printit(){echo "Your choice is ${2}"
}
#自行测试吧!

循环语句

while

操作当条件为真的时候进入循环

while [条件]
do
操作
done

需求①——while语句
假设我要让使用者输入 yes 或者是 YES 才结束程序的执行,否则就一直进行告知使用者输入字串。

[root@localhost ~]# vim 16.sh     #编写脚本#!/bin/bash
while [ "${yn}" != "yes" -a "${yn}" != "YES" ]
do
read -p "Please input yes/YES to stop this program: " yn
done
echo "OK! you input the correct answer."
[root@localhost ~]# sh 16.sh      #执行脚本测试
Please input yes/YES to stop this program: yes
OK! you input the correct answer.
[root@localhost ~]# sh 16.sh      #执行脚本测试
Please input yes/YES to stop this program: dd
Please input yes/YES to stop this program: f
Please input yes/YES to stop this program: YES
OK! you input the correct answer.

util

当条件为假的时候进入循环

util [条件]
do
操作
done

需求②——until语句
与上面的需求一样,只是换成until语句。

[root@localhost ~]# vim 17.sh      #编写脚本如下#!/bin/bash
until [ "${yn}" == "yes" -o "${yn}" == "YES" ]
doread -p "qing shu ru 'yes' or 'YES':" yn
done
echo "OK!!!"
[root@localhost ~]# sh 17.sh     #多次执行进行测试
qing shu ru 'yes' or 'YES':yes
OK!!!
[root@localhost ~]# sh 17.sh      #多次执行进行测试
qing shu ru 'yes' or 'YES':df
qing shu ru 'yes' or 'YES':YES
OK!!!
#不难发现,until与while正好相反,until是某个测试条件成立,则不循环;
#while是如果某个测试条件成立,则循环

需求③
求1到100的累积相加的和。
这个题目还是比较经典又简单的,如下(实现的方法有很多,自行研究吧):
方法1:

[root@localhost ~]# vim 18.sh     #编辑脚本#!/bin/bash
i=0
sum=0
while [ ${i} -lt 100 ]
doi=$(( ${i}+1 ))sum=$(( ${sum}+${i} ))
done
echo "1+2+3+4....+100 de jie guo shi ${sum}."
[root@localhost ~]# sh 18.sh     #执行脚本
1+2+3+4....+100 de jie guo shi 5050.       #5050就是结果

方法2:

[root@localhost ~]# vim 18.sh      #脚本内容如下#!/bin/bash
i=0
while [ ${i} -le 100 ]
dosum=$(( ${sum}+${i} ))let i++
done
echo "1+2+3+4....+100 de jie guo shi ${sum}."
[root@localhost ~]# sh 18.sh      #执行脚本
1+2+3+4....+100 de jie guo shi 5050.

方法3(比前两种方式更加智能些,可以以交互式的方式,指定累积加到某个数字):

[root@localhost ~]# vim 23.sh      #内容如下#!/bin/bash
read -p "Please input a number, I will count for 1+2+...+your_input:" nu
s="0"
for ((i=1;i<=${nu}; i++))
do
s=$((${s}+${i}))
done
echo "the result of '1+2+...+${nu}' is ==> ${s}"
[root@localhost ~]# sh 23.sh     #执行
Please input a number, I will count for 1+2+...+your_input:100    #输入100
the result of '1+2+...+100' is ==> 5050     #执行后输出的结果
[root@localhost ~]# sh 23.sh        #再执行
Please input a number, I will count for 1+2+...+your_input:99   #累积加到99
the result of '1+2+...+99' is ==> 4950     #执行后输出的结果

for

用法

for 变量 in 变量
do
操作
done

需求①

第一次循环时, $name 的内容为 内容1 ;
第二次循环时, $name的内容为 内容2 ;
第三次循环时, $name的内容为 内容3 ;
实现该需求有两种方法,若需要循环的内容较多,建议采用方法1。
方法1:

[root@localhost ~]# vim 19.sh      #编写脚本文件#!/bin/bash
name=`cat /dongwu.txt`
for names in ${name}
do
echo "There are ${names}s.... "
done
[root@localhost ~]# vim /dongwu.txt     #编写脚本中指定的文件dog
cat
elephant
[root@localhost ~]# sh 19.sh     #执行并查看是否将上面文件中的内容依次输出
There are dogs....
There are cats....
There are elephants.... 

方法2:

[root@localhost ~]# vim 19.sh     #编写脚本文件#!/bin/bash
for name in dogs cats elephants
do
echo "There are ${name}s.... "
done[root@localhost ~]# sh 19.sh     #执行脚本
There are dogss....
There are catss....
There are elephantss.... 

需求①
由于系统上面的各种帐号都是写在/etc/passwd 内的第一个字段,那么怎么通过管线命令的cut捉出单纯的帐号名称后,以id分别检查使用者的识别码与特殊参数呢?

脚本如下:

[root@localhost ~]# vim 20.sh     #编写脚本#!/bin/bash
users=`cut -d ':' -f1 /etc/passwd`
for username in ${users}
do
id ${username}
done
[root@localhost ~]# sh 20.sh      #执行脚本
uid=0(root) gid=0(root) 组=0(root)
uid=1(bin) gid=1(bin) 组=1(bin)
uid=2(daemon) gid=2(daemon) 组=2(daemon)
uid=3(adm) gid=4(adm) 组=4(adm)
uid=4(lp) gid=7(lp) 组=7(lp)........................#省略部分内容

综合示例

需求1:
让用户输入某个目录文件名,然后自动找出某目录内的文件名的权限。

[root@localhost ~]# vim 22.sh     #脚本内容如下#!/bin/bash
read -p "qing shu ru yi ge dirctory name:" dirname
if [ "${dirname}" == "" -o ! -d "${dirname}" ]thenecho "qing shu ru zheng que de dirctroy name."exit 1
fi
filelist=`ls ${dirname}`
for filename in ${filelist}
do
[ -r ${filename} ] && perm="read"
[ -w ${filename} ] && perm="${perm}+write"
[ -x ${filename} ] && perm="${perm}+exe"
echo "${filename} de quan xian shi ${perm}."
done
[root@localhost ~]# sh 22.sh     #执行脚本
qing shu ru yi ge dirctory name:/root     #根据提示指定一个目录
10.sh de quan xian shi read+write.
11.sh de quan xian shi read+write.
12.sh de quan xian shi read+write.
13.sh de quan xian shi read+write.
14.sh de quan xian shi read+write.
15.sh de quan xian shi read+write.
16.sh de quan xian shi read+write.
17.sh de quan xian shi read+write.
18.sh de quan xian shi read+write.
19.sh de quan xian shi read+write.
1.sh de quan xian shi read+write+exe....................#省略部分内容

需求2:

搭配乱数来挑选(相当于抛硬币),这里比如说不知道要吃什么,执行以下脚本来决定吃什么。

[root@localhost ~]# vim 24.sh      #内容如下,11、22....假设为食物代号#!/bin/bash
eat[1]="11"
eat[2]="22"
eat[3]="33"
eat[4]="44"
eat[5]="55"
eat[6]="66"
eat[7]="77"
eat[8]="88"
eat[9]="99"
eatnum=9
check=`echo "${RANDOM} % 10" | bc `
echo "your may eat ${eat[${check}]}"
[root@localhost ~]# sh 24.sh     #多次执行,进行测试,会发现每次输出的结果都不一样
your may eat 22
[root@localhost ~]# sh 24.sh
your may eat 55
[root@localhost ~]# sh 24.sh
your may eat 99

脚本检错

sh

参数 :

-n 不执行脚本,仅显示语法问题

-v 执行脚本之前,先将脚本内容展示出来

-x 将使用到的脚本内容显示出来

sh -nvx scripts.sh

[root@localhost ~]# sh -n 5.sh      #如果语法没问题,则不会有任何输出
[root@localhost ~]# sh -n 5.sh     #故意写错后,再测试
5.sh:行3: 未预期的符号 `do' 附近有语法错误
5.sh:行3: `do'
[root@localhost ~]# sh -x 6.sh        #将6.sh的执行过程都显示出来
+ echo -e '\ncheng xu de wen jian ming shi 6.sh'cheng xu de wen jian ming shi 6.sh
+ echo -e '\nyi gong you 0 ge can shu.'yi gong you 0 ge can shu.
+ '[' 0 -lt 2 ']'
+ echo 'can shu tai shao le .'
can shu tai shao le .
+ exit 0

Shell脚本语法小全相关推荐

  1. IFrame语法小全

    IFrame语法小全   IFrame可以在网页内嵌入另一个页面,类似"画中画"形式. 标记的使用格式是: <Iframe src="URL" width ...

  2. IFrame语法小全 --使用iframe内的函数

    IFrame语法小全 IFrame语法小全   IFrame可以在网页内嵌入另一个页面,类似"画中画"形式. 标记的使用格式是: <Iframe  src="URL ...

  3. ubuntu shell脚本弹窗小工具yad

    ubuntu shell脚本弹窗小工具yad 简介 安装 使用 选择文件夹/文件 输入文本 选择下拉菜单 小结 简介 yad是ubuntu下面的一个很有用的命令行工具,可以在shell脚本里弹窗给用户 ...

  4. Pascal语法小全

    Pascal语法小全 OBJECT PASCAL PROGRAMING (WRITED BY C.Y.C ATTENTION SYSTEM DEVELOPMENT CO,.) 1.标记(TOKEN) ...

  5. Linux系统通过Shell脚本实现一个全方面的系统性能分析系统

    Linux系统通过Shell脚本实现一个全方面的系统性能分析系统 文章目录 Linux系统通过Shell脚本实现一个全方面的系统性能分析系统 1.利用select循环实现系统工具箱 2.命令技巧 3. ...

  6. Linux中srch出现bash,ultraedit中shell脚本语法着色

    ultraedit中shell脚本语法着色 点击菜单"高级"-"配置",打开配置对话框.在导航一栏,点击"编辑器显示"----"语 ...

  7. VsCode shell脚本语法检查插件ShellCheck(shell检查、shell插件、shell语法检查、静态检查)

    像这种,很轻松给你检查出来: 并且告诉你如何修复: 还有网页版的:https://www.shellcheck.net/ 参考文章1:linux shell脚本 静态检查工具 shellcheck 简 ...

  8. shell脚本动画小工具

    shell脚本动画小工具 看gif图: shell脚本版 脚本内容如下: #!/usr/bin/env bash## ----------------------------------------- ...

  9. linux 的动画脚本,shell脚本动画小工具

    shell脚本动画小工具 看gif图: shell脚本版 脚本内容如下: #!/usr/bin/env bash ## ---------------------------------------- ...

最新文章

  1. 打开git命令窗口_用动图的形式打开 10 大 Git 命令?
  2. 怎样用python自动化办公_会python基础,如何学习自动化办公?
  3. 黑马程序员_Java学习日记 num1
  4. COM_PRODUCT_READ_SINGLE called by composite API when line item is deleted
  5. 卡特兰数 HDU2067 HDU4165 HDU1134
  6. [转载] 必须要会回答的Java面试题(字符串篇)
  7. IoT -- (九) IoT通讯技术选型与模型设计
  8. r 重命名 列名_R-reshape2
  9. OpenGL基础2:OpenGL简介
  10. POJ 2773 Happy 2006 (容斥原理)
  11. 1.12 Linux查看用户信息
  12. PHOTOSHOP使用总结
  13. Blazeds文档(二)-------Blazeds体系结构(一)【转载】
  14. 异名一文带你读懂Chrome小恐龙跑酷!
  15. Android 校正系统时间的三种解决方案
  16. 亲爱的面试官,这个我可没看过!(Android部分)
  17. 第八届中国大学计算机设计大赛,2015年(第八届)中国大学生计算机设计大赛.PDF...
  18. 华为高管又出事了!涉嫌受贿被带走!拿着几百万年薪,为啥还要贪?
  19. PostgreSQL 之 学籍管理示例
  20. discuz!x2主题分表、帖子分表功能分析

热门文章

  1. 中国可降解塑料行业深度分析及未来发展趋势展望2021年版
  2. 标准std::string分割字符串split
  3. split分割字符串(按两种符号分割)
  4. 数学速算法_小学数学速算法,掌握了至少提高20分!
  5. 微凉的风吹着我凌乱的头发,突然决定开个客博,以录下从MATLAB到OMNET的艰难历程
  6. 818品牌logo背后的故事
  7. OpenGL学习记录
  8. java excel api及详细教程_Java Excel Api及详细教程
  9. 我的第一篇博客,为什么要学软件工程
  10. 学科实践活动感悟50字_学科实践活动写实记录50字范文