linux下创建一个可执行脚本

1.touch hello.sh
 
2.vim hello.sh 
 键入i 
 插入#!/bin/sh
     echo hello world;
 键入: 
    esc 
    :
    wq
3.chmod 700 hello.sh   解释-rwx------ (700) -- 仅仅有属主有读、写、运行权限。

 
4. 运行./hello.sh
原文地址:https://www.cnblogs.com/llguanli/p/7374886.html