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:
git diff -S fields. f643660f169a26d8c2e71d7496c981bc2c171421

This somehow gives some weired output as it seems there has been added the windows line ending to many files (^M)

If there is no other way than suggested here [1], SA should thingk about how enforcing this, because the diff command is somewhat useless, if you want to extract customized information from history that way 



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


--
Glass Expansion
15 Batman Street
West Melbourne
Victoria 3003
AUSTRALIA
T: +61 3 9320 1111
F: +61 3 9320 1112
www.geicp.com


Click here to check out our new TruFlo Sample Monitor


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp

Reply via email to