If ReplaceLeftWithRight_where_you_do_not_replace_things.txt contains pairs of line replacements, where any occurrence of text in the first column should be replaced by the second column,
1 one 2 two 3 three four fyra five fem
then this can be trivially expressed as a sed script.
s/1/one/g s/2/two/g s/3/three/g s/four/fyra/g s/five/fem/g
and you can trivially use sed to create this sed script:
sed 's%.*%s/&/g%;s% %/%' ReplaceLeftWithRight_where_you_do_not_replace_things.txt
then pass the output of this to the second sed instance:
sed 's%.*%s/&/%;s% %/%' ReplaceLeftWithRight_where_you_do_not_replace_things.txt | sed -f - someFile_Where_You_Replace_Things.txt
to replace all matches in someFile_Where_You_Replace_Things.txt and print the output to standard output.
Unfortunately, not all sed dialogs support the -f - option to read a script from standard input, but this should work, at least on most Linux.
Sorry if I misunderstood your problem.
source share