DATA="Some text data that i want to change" DATA=$( echo $DATA | sed 's|text data|binary crap|' ) echo $DATA