I am trying to run.Sh file on my Windows machine using GitBash but it is giving error -
run_main.sh: line 3: pkill: command not found
rm: cannot remove '/root/impactAllClient/NewsCollected.csv': No such file or directory
run_main.sh: line 7: C:ProgramDataAnaconda3binpythonimpactAllClient-mastercreateDataset.py: command not found
run_main.sh: line 10: C:ProgramDataAnaconda3binpythonimpactAllClient-masterallClientAbstractive.py: command not found
Though I have my files in correct locations - C:\ProgramData\Anaconda3\bin\python\impactAllClient-master
Here is my.sh File code
#!/bin/bash
pkill -f allClientAbstractive.py
sleep 10
rm /root/impactAllClient/NewsCollected.csv
C:\ProgramData\Anaconda3\bin\python\impactAllClient-master\createDataset.py
sleep 10
C:\ProgramData\Anaconda3\bin\python\impactAllClient-master\allClientAbstractive.py &
Can you run pkill
manually in GitBash? I guess it's not installed.
I think this is not a valid Windows path: /root/impactAllClient/NewsCollected.csv
. It should start with something like /c/...
.
Also the Paths C:\ProgramData\...
, should use forward slashes and start like /c/ProgrammData/...
, when using GitBash.
You can open a bash shell in the path C:\ProgramData\Anaconda3\bin\python\impactAllClient-master\
and then run pwd
.The path that is printed to the console should be used in the script.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.