The following perl one liner checks if $CURRENT_VERSION matches $NEW_VERSION exactly, and prints it if it does.
Example:
CURRENT_VERSION=223.3.12.4.5.3
NEW_VERSION=223.3.12.4.5.3
DATE=17.3.2013
echo $CURRENT_VERSION | \
perl -ne 'BEGIN { $STR = shift(@ARGV); } print if /\Q$STR\E/; ' $NEW_VERSION
223.3.12.4.5.3
What do I need to add to the perl one liner to print the $DATE value at the end of the line?
For example:
CURRENT_VERSION=223.3.12.4.5.3
NEW_VERSION=223.3.12.4.5.3
DATE=17.3.2013
echo $CURRENT_VERSION | \
perl -ne'BEGIN { $STR = shift(@ARGV); } print if /\Q$STR\E/; ' \
$NEW_VERSION < add syntax to print $DATE >
223.3.12.4.5.3 17.3.2013