Does anyone know why the following script doesn't work?
cmda='hd "The Simpsons.(19x15).avi"|head'
cmdb="hd 'The Simpsons.(19x15).avi'|head"
cmdc='hd The\ Simpsons.\(19x15\).avi|head'
When I run it I get
hd: "The: No such file or directory
hd: Simpsons.(19x15).avi"|head: No such file or directory
hd: 'The: No such file or directory
hd: Simpsons.(19x15).avi'|head: No such file or directory
hd: The\: Invalid argument
hd: Simpsons.\(19x15\).avi|head: Invalid argument
The strange thing is that those commands are perfectly fine if I copy the text variable out and run it...
The reason for my question above is because I have a script that generates a command dynamically and puts that command in a variable for execution.