- 19
- 0
- 约 38页
- 2017-01-12 发布于北京
- 举报
[脚本介绍总结
Shell脚本介绍 脚本语言是不需要事先编译,在执行时才直接解释每一行程序的语言。 具有接受命令行参数、用户输入输出及设置变量的能力 vi的3种模式转换关系 Shell脚本介绍 创建shell脚本 在vi输入下列文件内容 #!/bin/bash #this script display date,time,username #and current directory echo –n “date and time is” date echo “executable path is “ $PATH echo –e “your username is:`whoami` \n” echo –e “your current directory is: \c” pwd Shell script 良好的 script 撰写习惯 在每个 script 的文件头处记录好: ? script 的功能; ? script 的版本信息; ? script 的作者与联络方式; ? script 的版权宣告方式; ? script 的 History (历史纪录); ? script 内较特殊的指令,使用绝对路径的方式来下达; ? script 运作时需要的环境变量预先宣告与设定。 执行shell脚本 []#bash filenam
原创力文档

文档评论(0)