File Watcher - Merging files into a single file with linux command

Answered

I'm trying to setup a File Watcher, what i want to accomplish is merging all js files from a directory in a single file places in the parent dir.

Linux command line it would be a:

cat * > ../merge.js

So i've tried the following setup:

But for some reason it is not working. there is just an error output stating "cat: * : file not found". 

It puzzles me even more, that if i use a simple "ls" without arguments the correct files are listed and written to output file

 

edit: stumbled on https://intellij-support.jetbrains.com/hc/en-us/community/posts/207095949-How-to-use-Filewatcher-to-run-a-shell-command with an explaining answer

2 comments
Comment actions Permalink

As my edit indicates, i stumbled on an explaining why it isnt working, but i found a working solution without an extra shell script:

program: bash
arguments: -c "eval 'cat *'"

 

1
Comment actions Permalink

Thanks for sharing!

0

Please sign in to leave a comment.