linux:shell脚本格式

来源:互联网 发布:windows 显示隐藏文件 编辑:程序博客网 时间:2024/06/06 00:26
shell脚本格式:
    #!/bin/bash //第一行指定bash
    命令群。。。。。
    
    例子:
    #!/bin/bash
    DESCDIR='/tmp/test'
    
    mkdir ${DESCDIR}
    touch ${DESCDIR}/file-`date +%F-%H-%M-%S`
    cp -r /etc/profile.d/ ${DESCDIR}
    
    unset DESCDIR
0 0
原创粉丝点击