Below is the shell script I am trying to find the meaning.
sed 's/19984 $/98400 /' | sed 's/19992 $/99200 /'
I expect 19984 $ will get replaced with 98400 and this string will be passed to next sed command which replace 19992 $ with 99200 .
But when I executed the script below with sample input
echo "19984 $ need to be replaced with 98400 "| sed 's/19984 $/98400 /' | sed 's/19992 $/99200 /'
I get the same string
"19984 $ need to be replaced with 98400"
I hope something I am missing here. Please help me. I am new to shell scripts. Thanks in advance!