溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

代碼函數(shù)名提取與shell 回顧

發(fā)布時間:2020-07-21 04:32:11 來源:網(wǎng)絡(luò) 閱讀:359 作者: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`  執(zhí)行命令 數(shù)值轉(zhuǎn)換

echo '\%  \\  " $gg `ls'  無變化輸出 不進(jìn)行任何解釋

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

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

本地變量

環(huán)境變量

內(nèi)部指令 cd

普通指令

條件測試

test $v  -gt 9

echo $?

[$v -gt 9] 



向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI