码迷,mamicode.com
首页 > 系统相关 > 详细

linux下创建一个可执行脚本

时间:2017-08-16 19:12:06      阅读:333      评论:0      收藏:0      [点我收藏+]

标签:执行   插入   class   inux   nbsp   脚本   运行   data-   tracking   

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

linux下创建一个可执行脚本

标签:执行   插入   class   inux   nbsp   脚本   运行   data-   tracking   

原文地址:http://www.cnblogs.com/llguanli/p/7374886.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!