Date: Wed, 22 May 2019 22:23:04 +0000 From: Charles-Henri Gros <charles-henri.g...@synopsys.com> Message-ID: <b51a83f93b459b479b6c4c3fbfe3f9310156f53...@us01wembx1.internal.synopsys.com>
| But unfortunately, grep was just illustrative, I'm using another tool | that takes a regex but has no "-F" option (though admittedly with some | effort I could add one, I wrote the tool in question). You can still do the sed to hide any $ in the command line the way you were doing. The important thing is to not expose the results to pathname expansion, and if you're going to use the shell to break apart the file names (field splitting) make sure IFS is set correctly - you might find IFS=$'\n' works better for your usage than the default (so filenames with spaces don't give problems). You might also want to use Chet's suggestion, and disable pathname expansion with "set -f". But this kind of thing is what happens when you don't povide all of the info about the problem you're having - people tend to provide answers to the problem you say that you have, rather than the actual issue. It is all good (and helpful) to find a simple test case for a problem you're seeing, and provide that as well - but always give the actual problem details. Here without knowing what kind of input your "tool in question" takes it is impossible for anyone to work out what a good solution would be. | Yes I'm not expecting any special characters except "$". It is best not to make too many assumptions - remember that even '.' is special in RE's and '.' is very common in filenames. kre