| ffilt - Filter a file via a command's STDIO and write back to the file |
ffilt - Filter a file via a command's STDIO and write back to the file
ffilt FILE COMMAND [ARGS]
Feed FILE into COMMAND's stdin, then save its stdout back to FILE if COMMAND ran successfully.
ffilt(1) is a quasi shorthand for this shell construct:
output=`cat FILE | COMMAND` [ $? = 0 ] && echo "$output" > FILE
sponge(1), insitu(1) https://github.com/athas/insitu
| ffilt - Filter a file via a command's STDIO and write back to the file |