[英]I recently installed cygwin but when i run any command in it, it says “-bash: git: command not found”
[英]sed command not found when run shell in window git bash
我在.sh文件中編寫shell並在windows平台的git bash中運行它。 Git bash命令行,它顯示“找不到sed命令”,但是當我在git bash命令行中鍵入sed命令時,它可以顯示sed幫助信息,如果我運行.sh的sed子句,它會正確執行。 我不知道為什么
確保在shell中直接執行時找到' sed
'的位置:
which sed
然后回顯腳本中的路徑(意思是:在腳本中添加以下行,然后運行所述腳本):
echo $PATH
並查看腳本在執行時是否包含一個PATH
,其中包含找到sed
的文件夾。
如果沒有,請修改腳本中的PATH
,或在腳本中使用sed
命令的完整路徑。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.