Shell脚本基本知识22400.docVIP

  • 2
  • 0
  • 约 8页
  • 2015-12-24 发布于贵州
  • 举报
Shell脚本基本知识22400

Shell脚本基本知识 概述:shell其实是内核与用户之间的一个接口, shell脚本 如果有一系列经常使用的linux命令,你可以把它们存储在一个文件肿。shenll可以读取这个文件,并执行其中的命令。这样的文件成为脚本文件。 执行shell脚本 要创建一个shell脚本,你要使用任何编辑器比如vi在文本文件中编写他。 为了使用bash shell赖执行脚本magic,其命令是:bash magic或者./magic echo命令: echo “this is an example of the echo command!” 屏幕上就会回显“this is an example of the echo command!” #符号 用于在shell脚本肿可以包含注解入口 echo “hello” #this is a comment line. this would not produce any output! echo “world!” 第二行是一个注解的例子。它将被shell忽略,而且不产生任何消息 变量: 可以在任何时间通过简单的赋值来创建。 语法: variable name-value

文档评论(0)

1亿VIP精品文档

相关文档