1.創建一個shell腳本文件
gedit hello_shell.sh ##創建文件
2.###在文件內添加一下內容
#!/bin/bash
for ((i=0;i<10;i++));do
echo "hello shell"
done
exit 0
3.為文件添加可執行權限
chmod 755 hello_shell.sh
4.執行腳本
./hello_shell.sh
###創建一個C語言程序"hello world"
1.gedit hello_world.c
2.##添加一下內容
#include <stdio.h>
int main(void)
{
printf("hello world!\n");
return 0;
}
3.保存后使用gcc生成可執行文件
gcc -o hello_world hello_world.c
gcc生成的二進制文件,默認具有可執行權限,不需要修改
