(19)--5.1 Shell脚本入门-美化整理0826.pptVIP

  • 7
  • 0
  • 约3.2千字
  • 约 31页
  • 2024-03-02 发布于江苏
  • 举报

Shell脚本起步Shell变量

Shell脚本起步

Shell脚本起步什么是Shell脚本?利用shell的功能命令写成的一个“程序”;类似于Windows下的批处理程序(.bat文件)。Shell脚本的特点适合对服务器管理;不适合做大量数值运算的任务。

Shell脚本起步Shell脚本程序编写user01@ubuntu:~$mkdirscripts;cdscriptsuser01@ubuntu:~$vish01.sh#!/bin/bash#Program:#ThisprogramshowsHelloWorld!inyourscreen.#History:#2017/05/17XLFirstreleaseechoHelloWorld!

Shell脚本起步Shell脚本运行sh/bash文件名如:user01@ubuntu:~/scripts$shsh01.shuser01@ubuntu:~/scripts$bashsh01.sh./文件名先将文件变成可执行文件,如:chmod711sh01.shuser01@ubuntu:~/scripts$./sh01.shsource文件名例:user01@ubuntu:~/scripts$sourcesh01.sh

Shell脚本起步四种运行方式异同

文档评论(0)

1亿VIP精品文档

相关文档