How can I delete the text ATTR_shiny_rat 0.900 from a bunch of .obj files at once using terminal?
Asked
Active
Viewed 51 times
-1
David Foerster
- 35,754
- 55
- 92
- 145
-
2What are `.obj` files and how do they look like? Could you please provide an example? – David Foerster Oct 27 '16 at 21:00
1 Answers
0
for i in *.obj; do
grep -v 'ATTR_shiny_rat\s0\.900' "$i" > temp
rm "$i"
mv temp "$i"
done
David Foerster
- 35,754
- 55
- 92
- 145
-
What happens if there's already a file `temp` in the current working directory? It would be lost in the process. – David Foerster Oct 27 '16 at 21:52