[Za-pm] Writing a search replace script

Karl Fischer kmf at pop.co.za
Tue Feb 24 08:24:13 CST 2004


I'm trying to write a script to automate balsa config files
I all ready created a default file for the script to use I want to
replace the USERNAME value with $username value I enter from the command
line.

any suggestions?

Karl


#!/bin/bash
echo "Enter a valid Unix Username :"
read $username
#USERNAME is unix name of the person
perl -pi -w -e 's|USERNAME|$username|g;' .gnome2/balsa





More information about the Za-pm mailing list