This shows that you can simply useCode:# echo "abc" | sed s/abc/`echo "123"`/ 123EDIT:: be careful of the ` ' and " ! They are all different and you need to terminate each opening with a closing of the same type! ' and " can be used interchangeably, while ` is the one that really causes things to be interpreted by the shell. It (the executing `) is usually above the tab button.Code:i=string sed s/somestring/`echo $i`/