Using pipes in an external tool


I am trying to use a pipe in an “External tool” as I would like to use an exectuable that takes input only from stdin (pbcopy on Mac OS X).

This is what I entered into the dialog for diagnostic reasons:
Bildschirmfoto 2012-02-16 um 08.24.36.png
As the script “dump-args.php” does nothing but print any command-line arguments to stdout, I would have expected to see “This is a test” in PhpStorm’s console, but nothing appears. Additionally, the script writes the argument to a file, but the file isn’t written, i.e.: it looks as if the script is not called at all.

In the console, the command is displayed as …

/bin/echo 'This is a test' | /Users/cb/bin/dump-args.php

…, which works as supposed when directly entered at the shell.

Any help is appreciated


1 comment
Comment actions Permalink

Save the command into a file, making it a script.  Then have the external tool execute the script.  That ended up working for me.


Please sign in to leave a comment.