Shell
Shell
脚本介绍
脚本介绍
►
创建
创建
shell
shell
脚本
脚本
在
在
vi
vi
输入下列文件内容
输入下列文件内容
#!/bin/bash
#!/bin/bash
#this script display date,time,username
#this script display date,time,username
#and current directory
#and current directory
echo –n “date and time is”
echo –n “date and time is”
date
date
echo “executable path is “ $PATH
echo “executable path is “ $PATH
echo –e “your username is:`whoami` \n”
echo –e “your username is:`whoami` \n”
echo –e “your current directory is: \c”
echo –e “your current directory is: \c”
pwd
pwd
指定以 bash shell 执行此文件
注释
日期与时间
执行路径
帐户名
目录位置
评论0
最新资源