Displaying 2 results from an estimated 2 matches for "cancelid".
Did you mean:
canceled
2015 Aug 25
5
sed question
I am trying to use sed to change a value in a pipe.
------------------- This is the two line script
CHANGE="1234"
cat my_file.txt | sed 's/CANCELID/$CHANGE/' > cancel.txt
-------------------
and the my_file.txt has:
<v1:notificationId>CANCELID</v1:notificationId>
it gets changed to $CHANGE instead of the actual value 1234 .
I tried putting a \ in front of the $ also and made no difference.
What am I not doing cor...
2015 Aug 25
0
sed question
On 08/25/2015 10:50 AM, Jerry Geis wrote:
> cat my_file.txt | sed 's/CANCELID/$CHANGE/' > cancel.txt
sed doesn't perform environment variable expansion. That is to say that
when you instruct sed to substitute "$CHANGE" for "CANCELID", "$CHANGE"
is a literal string that will be substituted.
bash, on the other hand, does perform en...