in reply to Script to update a value in text file

Welcome to the Monastery, Advising you to try to make your own script that does this job and then once you've fallen short we can pick it up from there as this site is not a code-writing service provider.

Show us what you have tried so far and we'd pick it up from there, but for starters, think about a hash, it is not clear if you want an incrementing that is uniform or random since you've not mentioned that.

Think about reading sno:10 and cno:10 into a hash and increment the hash values...

Also relevant, read How do I post a question effectively?, Markup in the Monastery and Writeup Formatting Tips


Excellence is an Endeavor of Persistence. A Year-Old Monk :D .