Emacs Grep Command and Unix Shell Quote Escape Pain

calling emacs's grep command have always been painful. i want grep with this regex height="[0-9]+">.

When calling emacs's grep command, i tried:

grep -ie -nH 'height\=\"[0\-9]\+\">' *html

and many variations with the backslash in different places, double backslash, single/double quotes. No go.

also, never really figured out the differences or semantics of single/double quote of unix shell.

this is char escaping fucked up to umpteenth level!

sure, one day, i could sit down and really figure it out (AND TRY TO REMEMBER IT (as am sure i've done this before)), then, sit down and figure out how emacs pass string to shell, but usually after 5 min of failures with trial & error, i switch to a short perl/python/elisp script that gets my job done.

btw, in {Perl, Python, PHP}, it's all relative simple. In elisp, it's more complex, and more cumbersome. I think elisp regex char escape situation is still easier to understand than unix shell, but possibly only because i haven't been digging bash as i've with elisp.

Popular posts from this blog

Browser User Agent Strings 2012

11 Years of Writing About Emacs

does md5 creates more randomness?