|
I use this little utility for find and
grep.
eg: find . -type f | esc_special | xargs grep "fields\." Maybe it should be called 'es' for typing sake. Put it in /usr/local/bin/ Regards Grahame Jordan #include <stdio.h> #include <string.h> /** Simple program to escape (i.e. prepend with a '\') characters that are BASH special symbols that can occur in MSDOS filenames. This is so lists of DOS files generated by "find" can be processed by bash scripts. Duncan Robertson 27 Nov 96 This is the command to compile: cc -Wall -O2 -o esc_special esc_special.c **/ /* This is the list of special characters we need to escape */ char *specials = "'\"\\()&~ "; int main(int argc, char *argv[]) { int the_char; while ((the_char = getchar()) != EOF) { if (strchr(specials,the_char) != (char *)NULL) { putchar('\\'); } putchar(the_char); } return (0); } On 07/08/14 08:25, David Arnold - El Alemán wrote:
--
Glass Expansion 15 Batman Street West Melbourne Victoria 3003 AUSTRALIA T: +61 3 9320 1111 F: +61 3 9320 1112 www.geicp.com |
_______________________________________________ Mailing list: https://launchpad.net/~openerp-community Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-community More help : https://help.launchpad.net/ListHelp

