Problem in making a script

Nils Kassube kassube at gmx.net
Wed Jun 29 11:14:06 UTC 2011


amritpal pathak wrote:
> I am making a script for my
> project.In between there is need for  settings of configuration
> files as per each user's needs. For example:
>  users will edit the file to mention he/her own mobile number ,own
> moblie model ,own database etc etc.
> How can i do it in the script?

If by script you mean "bash script", you could use the echo and read 
commands to query the user. And for manipulating config files you could 
use e.g. sed if the config file is a text file. Please have a look at 
these URLs for more details:

<http://www.gnu.org/software/bash/manual/html_node/index.html>
<http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html>
<http://tldp.org/LDP/abs/html/index.html>
<http://www.gnu.org/software/sed/manual/html_node/index.html>

If you don't mean a bash script, please clarify which script language 
you are interested in.


Nils




More information about the ubuntu-users mailing list