From another cross-platform program I would like to use the UnxUtils tr.exe program exactly as under Unix but I can't manage to get it to work, the issue being the escaping. Here's an example.
Create a file blah.txt with content
%^&<>|'`,;=()!\"\\[].*?
Then
type blah.txt | tr.exe "*" "X"
tr.exe: extra operand `blah.txt' Try `tr.exe --help' for more information.
The problem is that Windows expands * to the files in the directory. But under Unix this is no problem. No matter what I tried, I can't escape the * properly under Windows. Similarly with the quotation mark ". Even if I can figure out how to rewrite the escaping properly, it will be a mess to apply this correction to a set of characters.
I managed to get sed.exe from the UnxTools to work consistently because here I can use program files with the -f option so that I don't need to escape things.
Any ideas?