Posted: Thu Oct 25, 2012 4:43 am Post subject: literal ^ in strings
I've noticed a issue with literal carets in strings. This arose because I was trying to use the match task in a script. I wanted to do a command like
match "^1" myfile
to list all lines that begin with the number 1. This however doesn't work. I can escape the caret:
match "\^1" myfile
and it will work.
There are several related points. The help for match doesn't suggest the escape needs to be used for the caret. And recalling the command using the up arrow keys starts stripping away escapes until the caret-number combination is interpreted as a history recall. Not sure what the intended behaviour is here.
This is a CL bug that apparent'y has been around forever, the history processing should not be done on literal strings of the command. When setting the params in epar things work as expected, otherwise the escapes are needed (but not handled properly). This will be fixed for the next update.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum