s/$old_hostname/$new_hostname/sgi
Note: You may also want to add \Q and \E around your $old_hostname if you don't want any special regex characters in there to affect the match.
s/\Q$old_hostname\E/$new_hostname/sgi
In reply to Re: String substitution
by Paladin
in thread String substitution
by kirk123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |