I have a React app where some files are in .ts
and some are in .tsx
Currently in order to update the contents of both .ts and .tsx files, I have to run 2 separate commands:
internal-web main % cd src
src main % find . -name '*.tsx' -print0 | xargs -0 sed -i "" "s/SomeThing/SOME_THING/g"
src main % find . -name '*.ts' -print0 | xargs -0 sed -i "" "s/SomeThing/SOME_THING/g"
Is there a way I can combine this to one command so that I can update both .ts and .tsx files at once?
find
is this? Are you really on UNIX or do you mean Linux? – terdon Jul 29 '22 at 17:54find
using-o
(or-or
in some implementations) - see for example Delete multiple patterns of files using one command (find) – steeldriver Jul 29 '22 at 17:55