linux shell脚本基本知识.pdfVIP

  • 3
  • 0
  • 约4.63千字
  • 约 8页
  • 2019-10-12 发布于河北
  • 举报
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 忽略,而且不产生任何消息 变量: 可以在任何时间通过简单的赋值来创建。 语法:

文档评论(0)

1亿VIP精品文档

相关文档