To execute a MS-DOS command from inside a cygwin BASH script:
- use <<<
- surround the entire command with quotes
- any quotes inside the command has to be escaped (\")
- any folder divider has to be escaped (\\)
- mklink can only be used if the cygwin terminal is executed as Administrator
$ cmd <<< "mklink /D \"${cn:1:4}_${r//\\/_}\" \"F:\\TV\\all\\$(echo "${REPLY}")\""
- using & allows to execute more than one MS-DOS command
$ cmd <<< "dir & dir"
Comments
Post a Comment