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

shell编程

时间:2017-04-22 00:58:50      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:流行   awk命令   ffffff   编程语言   nbsp   cat   root   绝对路径   roo   

  • shell编程

1.什么是shell

shell是用户与内核进行交互操作的一种接口,目前最流行的shell称为bash shell

shell也是一门编程语言,<解释性编程语言>,即shell脚本

一个系统可以存在多个shell,可以通过cat /etc/shells 命令查看系统中安装的shell,不同的shell可能支持的命令语法不同

2.shell脚本的执行方式

第一种:

输入脚本的绝对路径或者相对路径,首先要赋予+x权限

  /root/helloworld.sh

  ./helloworld.sh

或者,不用+x权限,而用解释器解释执行

  sh helloworld.sh

第二种:

bash或者sh+脚本

sh /root/helloworld.sh

sh helloworld.sh

 

 

 

  • sed命令

  • awk命令

  • crontab定时器

 

shell编程

标签:流行   awk命令   ffffff   编程语言   nbsp   cat   root   绝对路径   roo   

原文地址:http://www.cnblogs.com/gengsc/p/6746645.html

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