[fpc-devel] Re: TProcess, bash, and escaping quotes

Seth Grover sethdgrover at gmail.com
Thu Feb 18 03:23:26 CET 2010

Thank you! It makes sense now. I'll keep an eye on the enhancement
request Marco pointed me to and use the workaround I came up with in
the meantime.


> If you look at how TProcess parses command line into parameters
> (fcl-process/src/unix/process.inc CommandToList) you see that it
> doesn't support escaping with backslash (inside or outside double
> quotes). Your command is parsed as (using FPC 2.5.1):
> 1: bash
> 2: -c
> 3: "ifconfig | grep -E -e \"inet6?
> 4: addr:\" | grep -v -E -e\"(|::1|Scope:Link)\" | sed
> -e\"s/^.*addr:\s*\(\S*\)\(\/\d+\)*.*$/\1/g\""
> --
> cobines

This email is fiction. Any resemblance to actual events
or persons living or dead is purely coincidental.

Seth Grover

More information about the fpc-devel mailing list