摘要:
#!/bin/bash echo "正在产生hello.c ..."
echo cat <<'EOF'>hello.c
# include <stdio.h> int main() { printf("hello world!\n"); return 0;
}
EOF echo "编译hello.c ..."
echo # 编译产生执行文件
gcc -o hello hello.c # 若编译成功
if [ $? -eq 0 ];then echo "执行hello ...&qu 阅读全文