首页 > 系统服务 > 详细

代码函数名提取与shell 回顾

时间:2016-08-14 14:47:40      阅读:303      评论:0      收藏:0      [点我收藏+]
  #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] 



代码函数名提取与shell 回顾

原文:http://wzsts.blog.51cto.com/10251779/1837743

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!