温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

代码函数名提取与shell 回顾

发布时间:2020-07-21 04:32:11 来源:网络 阅读:351 作者:wzdouban 栏目:编程语言
  #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] 



向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI