"cat" as a file watcher (redirection problem)

Hello Community

I'm trying to set up a file watcher to merge several files into one. I've tried to use "cat" as the program, and redirect the output with standard shell redirection, like this:

Program: cat
Arguments: $FilePath$ > /path/to/my/dest/file
Output path: /path/to/my/dest/file

The watched is triggered but seems to be confused: the output of the "Run" window is:

cat /my/source/file/ > /path/to/my/dest/file

followed by the source file content.

I also tried to remove the redirection and check "Create output from stdout", same result.

Is there a way to make it work directly, or should I write an external shell script to handle it?

TIA

greg

1 comment
Comment actions Permalink

Hi there,

or should I write an external shell script to handle it?

That would be the best and safest way.

0

Please sign in to leave a comment.