SHELL之使用结构化命令 使用if-then语句 Bash代码 ifcommand then commands fi 如果if后面的命令退出状态码=0,那么就执行then 另外一种形式 Bash代码 ifcommand;then commands fi if-then-else语句 Bash代码 ifcommand then commands else commands fi 如果if后
先看下简单的初始代码:注意其编译运行后的结果。root@xuanfei-desktop:~/cpropram/2# cat global.h //头文件#ifndef CLOBAL_H #define GLOBAL_H #include <stdio.h> int funca(void); int funcb(void);#endifroot@xuanfei-desktop:~/cpropram/2# cat fu