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
- 36,264
- 56
- 94
- 147
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
- 36,264
- 56
- 94
- 147
-
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
.obj
files and how do they look like? Could you please provide an example? – David Foerster Oct 27 '16 at 21:00