View previous topic :: View next topic |
Author |
Message |
Lasitus Apprentice
Joined: 05 Oct 2002 Posts: 188 Location: Orlando, FL
|
Posted: Thu Aug 28, 2003 12:15 am Post subject: Reading/Editing text files with bash or rc-scripts |
|
|
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 |
|
|
duff Guru
Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Thu Aug 28, 2003 12:23 am Post subject: |
|
|
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 |
|
|
Lasitus Apprentice
Joined: 05 Oct 2002 Posts: 188 Location: Orlando, FL
|
Posted: Thu Aug 28, 2003 1:50 am Post subject: |
|
|
whoa, I never knew about this. It is so easy and powerful. Thanks! |
|
Back to top |
|
|
|