let say there is a file:
> cat temp
hI thIs is woRld
How can we make it hI thIs is woRld
Hi This Is World
Its very simple to do it in perl:
perl -pe 's/(\w+)/\u\L$1/g' your_file
If you want to do it inplace just add a -i flag:
perl -pi -e 's/(\w+)/\u\L$1/g' your_file
No comments:
Post a Comment