shell replace pattern in string