문제

I am trying to run a cygwin script in powershell. How can I do that?

I tried giving full path of the scripts followed by args . it isnt working example : /c/script/path/script args

도움이 되었습니까?

해결책

Use either /cygdrive/c/script/path/script or C:/script/path/script (note the capital C and lack of leading slash in the latter path). Plus, need to run the script with the correct interpreter, e.g.:

& C:\cygwin\bin\bash.exe /cygdrive/c/script/path/script ...

다른 팁

Having cygwin installed with the ssh stuff and SCP utility you can simply issue:

C:\cygwin\bin\scp.exe /cygdrive/c/Users/YOU/Documents/file.txt root@remoteserver:/tmp/

I find above can marked solution becomes a bit too shortcoming as the bash profile is not quite the same as in a working cygwin bash environment.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top