醉裡挑燈看Code
2019年7月1日 星期一
不同 OS Shell 常用語法
偶爾會在 Windows、Linux 和 UEFI Shell 下跑來跑去,各個 Shell 的常用語法都不同,乾脆記錄一下,才不用每次都 google。
Windows
Linux
UEFI
Declare Variable
set ABC=XXX
ABC=XXX
set ABC XXX
Use Variable
echo %ABC%
echo $ABC
echo %ABC%
Error Indicator
echo %ERRORLEVEL%
echo $?
echo %LASTERROR%
The variable scope in other script
global
must use EXPORT
??
沒有留言:
張貼留言
‹
›
首頁
查看網路版
沒有留言:
張貼留言