I have a file and I want to append the value in a unix variable at the end of each line using SED.
I have already achieved this through AWK but I would like to do it in SED
something like this. I have already tried the below command and it's not working.
sed -i 's/$/"$BATCH_RUN_DATE"/g' data.csv
Error
sed: -e expression #1, char 10: unknown option to `s'
GNU sed version 4.2.1
Note: If you don't know the answer that's fine but don't mark it as duplicate. The one that you provided the reference is different from this question.
Regards, Aswinikumar