On 2002.06.06 02:11 Jesse Angell wrote:
> Okay,
>  There is a file lets call it user.conf
> on line 23 of the file there is a line that says
> user=blahblah
> I want to have a varible in a script.. $user = john
> that edits user.conf and changes user=blahblah to user=thevarible$user...
> How would I do this.
> 


Use the m4 macro language.  Write a config file called user.conf.mf, put 
in it:

user=$USER

Then,

m4 --define=USER=john user.conf.m4 > user.conf

will do what you want.

See "info m4".

Karl <[EMAIL PROTECTED]>



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to