首页 > 试题广场 >

请建立一支 script ,当你执行该 script 的时候

[问答题]
请建立一支 script ,当你执行该 script 的时候,该 script 可以显示: 1. 你目前的身份 (用 whoami ) 2. 你目前所在的目录 (用 pwd)
#!/bin/bash current_user=`whoami` current_dir=`pwd` echo $current_user echo $current_dir
发表于 2021-03-04 14:39:43 回复(0)
#!/bin/bash
echo -e "your name is ==> $(whoami)"
echo -e "the current directory is ==>$(pwd)"
发表于 2020-12-10 10:16:18 回复(0)
#/bin/bash
`whoami`
`pwd`
发表于 2020-05-01 18:04:59 回复(0)
#/bin/shell
whoami
pwd
发表于 2019-01-09 23:56:06 回复(0)