Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Reading/Editing text files with bash or rc-scripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Lasitus
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 188
Location: Orlando, FL

PostPosted: Thu Aug 28, 2003 12:15 am    Post subject: Reading/Editing text files with bash or rc-scripts Reply with quote

Is there a way to edit text files with rc-scripts or would it be necessary to write in a programming language such as C?
Back to top
View user's profile Send private message
duff
Guru
Guru


Joined: 19 Jun 2002
Posts: 466
Location: Clemson, SC

PostPosted: Thu Aug 28, 2003 12:23 am    Post subject: Reply with quote

Most people use sed, the stream editor, to do this. If you're comfortable with vi commands, you shouldn't have any problem figuring out how to use it. Quite a few ebuilds use sed for editing Makefile and configuration files, if you need some examples.
Back to top
View user's profile Send private message
Lasitus
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 188
Location: Orlando, FL

PostPosted: Thu Aug 28, 2003 1:50 am    Post subject: Reply with quote

whoa, I never knew about this. It is so easy and powerful. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum