输出命令行参数

来源:互联网 发布:算法导论epub中文版 编辑:程序博客网 时间:2024/06/06 10:54
    #!/bin/sh  
      
    salutation="Hello"  
    echo $salutation  
    echo "The program $0 is now running"  
    echo "The second parameter was $2"  
    echo "The first parameter was $1"  
    echo "The parameter list was $*"  
    echo "The user's home directory is $HOME"  
      
    echo "Please enter a new greeting"  
    read salutation  
      
    echo $salutation  
    echo "The script is now complete"  
   # exit 0  
0 0
原创粉丝点击