Reputation: 93
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
Upvotes: 9
Views: 12217
Reputation: 8641
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.
Upvotes: 1
Reputation: 200273
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 ...
Upvotes: 7