Зануда ([info]3ahyga) wrote,
@ 2009-06-16 10:29:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:ИТ, баш, линукс

Замена строк в текстовом файле разом в линуксе...
# for i in $(find . -name "*mask*ext"); do sed -e 's/find/replace/' ${i} > "${i}.tmp"; mv "${i}.tmp" ${i}; done

ОБН: благодарствую ямофета.
# find . -name '*mask*ext' -exec sed -e 's/find/replace/' -i \{} \;




(Read 11 comments) - (Post a new comment)


[info]iamphet
2009-06-17 12:17 pm UTC (link)
ну а просто sed -e '...' somefile > tmpfile работает?

(Reply to this) (Parent)(Thread)


[info]3ahyga
2009-06-17 12:26 pm UTC (link)
да

(Reply to this) (Parent)


(Read 11 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…