#include<stdlib.h>#include<stdio.h>intmain(){FILE*in;FILE*out;charc;intcount=0;puts("pleaseuesin.txt");in=fopen("in.txt","r");out=fopen("out.txt","w");while((c=fgetc(in))!=EOF){if(c=='{'){count++;if(count==1)fputc(c,out);}if(c=='}')count--;if(count<1)fputc(c,out);if(count>1)fputc('',out);}fclose(in);fclose(out);return0;}//待更多测试未美观没有去空行没有形成固定的fun(){}形式


COUNT=0;

WHILE [$C -le 100];

do touch "WZ$COUNT" DONE


LS TEST?

LS TEST*

LS TEST[2-5]

LS TEST[2-100] 仅test0 //error

LS TEST[0-9]9 test9test19 test29


date +%Y-%m-%d %H-%M-%s

mytime=$(date +%Y-%m-%d %H-%M-%s)

mytime=`date +%Y-%m-%d %H-%M-%s`

echo mytime

int=123

echo $int+$int #123+123

echo $(int+int) #246

echo $($int+$int) #246

((data=int+int))

echo data #246


touch $ $

touch $\$

touch \$\ \$

touch -file

touch \-file

touch ./ -file

rm -f ./ -file

touch -- -file

rm -- -file


'' and " "

gg=100

echo "\% \\ '" $gg `ls` 执行命令 数值转换

echo '\% \\ " $gg `ls' 无变化输出 不进行任何解释

run(./sh #!bin/bash cmd +x)

fahell ->fork()->cshell->exec(bash)->read shell

本地变量

环境变量

内部指令 cd

普通指令

条件测试

test $v -gt 9

echo $?

[$v -gt 9]