????? Linux ????????????????? Bash ????????
???????????? ???????[ 2015/8/10 10:42:27 ] ??????????????
????????? bash shell ??????????????? bash shell ???????????????????????? unset ????????????????????????????? bash ?? ksh shell ??????????????г??????
??????????? Linux ???? Unix ??????? env ???????ò??????????env ???????????????????????????????????????г???
???????????????????
???????????ó???????????????????????
????printenv
??????
????env
?????????????
????Fig.01?? Unix/Linux?? ?г????л???????
?????????????????
?????????????????
????env | wc -l
????printenv | wc -l # ????
?????????????
????20
?????????? bash/ksh/zsh ?????????г???
???????????????
????env -i your-program-name-here arg1 arg2 ...
???????磬??????? http_proxy ??/???κ???????????????????????? wget ?????????????? bash/ksh/zsh ?????????????? wget ????
????env -i /usr/local/bin/wget www.cyberciti.biz
????env -i wget www.cyberciti.biz # ????
??????????????κ?????????????????????????????????á?????????????????????????? http_proxy ??????????????????????
???????????? http_proxy
????$ wget www.cyberciti.biz
????--2015-08-03 23:20:23-- http://www.cyberciti.biz/
????Connecting to 10.12.249.194:3128... connected.
????Proxy request sent?? awaiting response... 200 OK
????Length: unspecified [text/html]
????Saving to: 'index.html'
????index.html [ <=> ] 36.17K 87.0KB/s in 0.4s
????2015-08-03 23:20:24 (87.0 KB/s) - 'index.html' saved [37041]
????????????? http_proxy
????$ env -i /usr/local/bin/wget www.cyberciti.biz
????--2015-08-03 23:25:17-- http://www.cyberciti.biz/
????Resolving www.cyberciti.biz... 74.86.144.194
????Connecting to www.cyberciti.biz|74.86.144.194|:80... connected.
????HTTP request sent?? awaiting response... 200 OK
????Length: unspecified [text/html]
????Saving to: 'index.html.1'
????index.html.1 [ <=> ] 36.17K 115KB/s in 0.3s
????2015-08-03 23:25:18 (115 KB/s) - 'index.html.1' saved [37041]
????-i ???? env ???????????????е????????????????????????????????? wget ?? curl???????μ??????????????????? bash/ksh shell ????????
????env -i env | wc -l ## ??? ##
????# ???????? bash ##
????env -i bash
????## bash ???????μ???????? ##
????env | wc -l
????????????????????????
?????????£?
????env var=value /path/to/command arg1 arg2 ...
????## ?? ##
????var=value /path/to/command arg1 arg2 ...
???????????? http_proxy:
????env http_proxy="http://USER:PASSWORD@server1.cyberciti.biz:3128/" /usr/local/bin/wget www.cyberciti.biz
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11