We have a process which can use a file containing sed commands to alter piped input.
sed
I need to replace a placeholder in the input with a variable value,
AFAIK, it's not possible. Your best bet will be :
INPUT FILE
aaa bbb ccc
SH SCRIPT
#!/bin/sh STRING="${1//\//\\/}" # using parameter expansion to prevent / collisions shift sed " s/aaa/$STRING/ " "$@"
COMMAND LINE
./sed.sh "fo/obar"
OUTPUT
fo/obar bbb ccc