polotek/procstreams — Issue #7: Can't escape characters in cmd
Author: stevengill
Created: 2012-02-08 00:45:20+00:00
State: open

This seems like a bug to me, but there may be a better way to do this.

Say I want to replicate the following command using procstreams

```sw_vers | awk '{print $2}'```

This doesn't work.

```p("sw_vers").pipe("awk '{print $2}'")```

It seems like it fails because it doesn't escape the single quote properly.

I tested this theory by doing two tests

```p("sw_vers").pipe("grep ProductVersion")```

and

```p("sw_vers").pipe("grep 'ProductVersion'")```

The top one without single quotes passes. The bottom one with single quotes failed. They both work in bash.