The scenario where I am stuck is that I have a normal windows text file 'command.txt' which I am copying on remote(unix) server from my local machine(windows) using 'pscp' command from cmd.
The file contains some unix commands which are required to run on remote server. The copy is done successfully, but it is getting copied as dos file. That is why, when I am trying to run command.txt file from my local machine using 'plink' as:
plink -pw password user@host bash -m /location of command.txt on the server/command.txt It is unable to execute command.txt. So, I need some windows command or may be some pscp option to convert my file to unix text file before copying it on the remote server.
The solution I know is using dos2unix, but I don't want to use it.