I'm about to use sed 's/a/b/' *ex/config/abs.json. by default it shows me all modifications but I want to know which files it would modify.
Something like
...
a1ex/config/abs.json
a2ex/config/abs.json
b177ex/config/abs.json
...
I'm about to use sed 's/a/b/' *ex/config/abs.json. by default it shows me all modifications but I want to know which files it would modify.
Something like
...
a1ex/config/abs.json
a2ex/config/abs.json
b177ex/config/abs.json
...
The command
sed 's/a/b/' *ex/config/abs.json
would not modify any files. It would read the contents of all the files whose names matches the given pattern, but since you don't write the changes back into the files (you don't use -i for example), there is no persistent modification made to the contents of the files.
To see what fils would have been modified, had you used sed -i (assuming you are using GNU sed), you should first run
grep -l 'a' *ex/config/abs.json
This would output the pathnames of the files that contains the letter a and that therefore would be modified by the sed expression s/a/b/ if an in-place edit was made.