#include <stdlib.h>
#include <stdio.h>
int main()
{
FILE *in;
FILE *out;
char c;
int count=0;
puts("please ues in.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);
return 0;
}
//待更多测试
未美观 没有去空行
没有形成固定 的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 test9 test19 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]
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。