I need to use sed on AIX to find and replace exact match of a string.
as an example we have a like like below
LogicalVolume hdisk1 hdisk10
and I have 2 variables
old_disk=hdisk1
new_disk=hdisk50
Here is the sed command I would like to use
sed "s/"$old_disk"/"$new_disk"/" file1.txt \> file2.txt
The outcome that I get looks like below
LogicalVolume hdisk50 hdisk500
instead of
LogicalVolume hdisk50 hdisk10
Unfortunately < and > do not work on AIX and I don't know how to replace the exact match of variable old_disk. I also tried ' and " around the variable, but it doesn't work neither.