From textfile database format,
Customer:HDB:Price:Left:Available
Ted:rm4:34:197:101
bash shell script,
read -p $'Price: ' Price2
sed -i "s/$Customer:$HDB:$Price/$Customer:$HDB:$Price2/g" CustomerDB.txt
When I key in 43, database return
Ted:rm4:4334:197:101
How do i replace it to be 43 instead of 34?
Seems like
$Priceis empty. Are you sure it contains the old price? If you want to replace all the prices regardless of the old value, you can use