bash-3.2$ FNAME=$1
bash-3.2$ OLD_NO=$(grep "_version=" | awk -F '"' '{print $12}' $FNAME)
Line 2 does not appear to be working for me. Am I not closing/quoting it correctly? It seems to hang
Updated the script to reflect below suggestions
echo $OLD_NO
OLD_NO=$(grep '_version=' "$FNAME" | awk -F '"' '{print $12}')
#Get the version of the
echo "What do you want to update release number to?"
REPLACEMENT="_version="$NEW_NO
echo $REPLACEMENT
sed -i ''s/$OLD_NO/$REPLACEMENT/g'' $FNAME
~
get a new error
bash-3.2$ ./vu reader.xml
What do you want to update release number to?
_version=
sed: -e expression #1, char 0: no previous regular expression
Works in bash though
bash-3.2$ grep _version market_rules_cd.reader.xml | awk -F '"' '{print $12}'
14.8.21.1