Problem in making a script

Nils Kassube kassube at gmx.net
Wed Jun 29 11:46:59 UTC 2011


amritpal pathak wrote:
> > How can i do it in the script?

> > well i found  i can accept user's input by using read command in
> > scripting .but still i have another problem.
> 
>                  I   have to edit the config file i.e I want that
> input given by the users will be replace by config file's entries at
> particuler line.
> please tell me how to replace user's input with config file's
> particuler line's stuff?
> 
> i am using gedit text editor.

If you want to do it with a script, gedit isn't the right tool. Use sed 
instead which is made for this task. Here is once more the link to the 
sed manual:

<http://www.gnu.org/software/sed/manual/html_node/index.html>

If you need further assistance, please tell us how you know which line 
to replace. Is it a particular line number or a text pattern?


Nils




More information about the ubuntu-users mailing list