摘要: #!/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 阅读全文
posted @ 2012-06-08 10:32 枯木-Linux 阅读(166) 评论(0) 推荐(0) 编辑