Answer the question
In order to leave comments, you need to log in
How to overwrite files received by find command?
Hello
In general, I encountered the following problem.
With the find command, I get all the files I need, which are then sent to myscript, processed there, and the processed data is sent to stdout. But now there is a need to just take and rewrite the file (replace with processed output) and I can't imagine how elegantly this can be done.
find. -name *.cpp gives a list of all .cpp files that I need to process.
The vera++ program receives one of the .cpp files as input and for each generates its transformation to stdout
. Now I need to overwrite the original .cpp file with this output.
Here's what I have at the moment:
find $INCFINDOPTS -name *.cpp | xargs -n 1 vera++ -r . --profile codechecker_transform
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question