[plug] X script to accept nickname and modify file.

Cameron Patrick cameron at patrick.wattle.id.au
Sat Jul 26 13:26:48 WST 2003


On Sat, Jul 26, 2003 at 12:33:30PM +0800, Weirdo wrote:
| I need a script that prompts for a nickname to input into my xchat prefs 
| file. It will only have to change 1 field (I=nickname). I would prefer 
| something that pops up a dialog but an xterm is fine as well. It would 
| modify the same file every time.

Have a copy of the file called e.g. servlist.in that has the nickname
set to @NICK@ then use sed and gmessage in a shell script to change it:

NICK="`gmessage "IRC nickname" -entry -buttons "Okay"`"
sed "s/@NICK@/${NICK}/g" <servlist.in >servlist.conf

(NB Above is untested.)

Cameron.



More information about the plug mailing list