Remove the tail comma

Hi,

I have one file with the following details,

file1.txt

The following are the accounts which are having the balance
22,22,22,10,12,00000013,

Here I want to delete the tail comma.

Can anybody help me out...

Thanks in advance..!!

sed 's/.$//' file

Try...

# echo "22,22,22,10,12,00000013," | sed 's/\,$//'
22,22,22,10,12,00000013

Thank you..Its working fine..!!:slight_smile: