I write shell in .sh file and run it in git bash of windows platform. The Git bash command line, it shows "sed command not found", but when i type sed command in the git bash command line, it could display the sed help information and if i run the .sh's sed clause, it executed properly. I don't know why
Make sure where the 'sed' is found when executed directly in the shell:
which sed
Then echo the path in your script (meaning: add the following line in your script, and run said script):
echo $PATH
And see if the script, when executed, include a PATH which has the folder where sed is found.
If not, modify the PATH in your script, or use the full path of the sed command in your script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With