运行语言
gcc -c demo.c 编译
->生成demo.o
gcc test.o -o test
->生成可执行文件demo
./demo
->执行
gcc demo.c -o demo
->生成可执行文件demo
->运行python语言
python demo.py
->执行
常用命令
1.
cat demo.txt
->获取第一行内容
cat < test.txt
-> 创建test.txt并输入内容直至遇到EOF
---------------------------------------------------------------------
2.
echo "hello"
->显示
hello
echo "hello" > demo.txt
->创建demo.txt并写入hello
vim demo.sh
read name ->name是变量名 ->read等同于scanf读入
echo "$name It is a test"
->编辑shell脚本
sh demo.sh
->运行
linux_testsh
->输入
linux_testsh It is a test
->显示