I have the following sed code that works in RH6 and sed 4.2.1
>> echo "SUSE Linux Enterprise Server 11 ( x86_64 ) VERSION = 11 PATCHLEVEL = 2" | sed s/.*VERSION\ =\ //
11 PATCHLEVEL = 2
>> sed --version
GNU sed version 4.2.1
but it fails at SUSE 11 and sed 4.1.5
>> echo "SUSE Linux Enterprise Server 11 ( x86_64 ) VERSION = 11 PATCHLEVEL = 2" | sed s/.*VERSION\ =\ //
sed: No match.
>> sed --version
GNU sed version 4.1.5
I found the following code works differently in the two versions. sed 4.1.5 in SUSE cannot match anything.
echo ab | sed s/.*//
Is it a known issue of sed? and does it have a solution?