in message <[EMAIL PROTECTED]>, wrote Jerry McAllister thusly... > > > Just curious, what do I need to do to be able to execute this > > script like: > > > > $ text-replace old_string new_string > > Check out tr(1). > It does a good job of it with very simple rules. ... > > sed -i '' "s/old/new/g" "$file"
tr(1) takes a *set of characters* in a string, not the given string as it is, to "translate characters" .. echo 'polka dot' | tr 'pol' 'x' ... in the OP's context, above should produce "xka dot" but produces instead "xxxka dxt". - Parv -- _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"