I have some csv like below
uid_01, joe, yes, no
uid_02, sam, yes, maybe
uid_03, c, ruth, yes, maybe
uid_04, **alan**, no, yes
I want to replace alan with ruby, uid will be unique here. I need to change depending on $position, any idea how to get that in sed?
Also I want to give both pattern and replacement value as arguments.
Tried something like this, but working only at last entry
sed -i '/^'$uid',/s/[^,]*$/'$returnvalue'/' $OUTPUT
Thanks in advance, please help!