Linux系统下运行C语言程序
创建目录
编写代码
编译
命令 ------- 参数-----编译后的文件名--------编译的源文件
运行
shiyanlou:~/ $ mkdir c [1:09:28]
shiyanlou:~/ $ cd c [1:09:32]
shiyanlou:c/ $ ls [1:09:34]
shiyanlou:c/ $ touch hello.c [1:09:36]
shiyanlou:c/ $ ll [1:09:49]
总用量 0
-rw-rw-r-- 1 shiyanlou shiyanlou 0 3月 20 01:09 hello.c
shiyanlou:c/ $ vi hello.c [1:09:51]
shiyanlou:c/ $ ls [1:11:45]
hello.c
shiyanlou:c/ $ gcc -o hell hello.c [1:12:18]
shiyanlou:c/ $ ls [1:12:35]
hell hello.c
shiyanlou:c/ $ ./hell [1:12:37]
hello world!
Linux系统下运行Sh语言程序
#!/bin/bash
for ((i=0; i<10; i++));do
echo "hello shell"
done
exit 0
#-------------------------------------------------
chmod 755 hello_shell.sh
#--------------------------------------------------------
./hello_shell.sh