tpatil created the topic: Remove Control ^M from files
Single file method
perl -pi -e "s/\r//" filename.txt
Multiple File Method
find . -type f -exec perl -pi -e "s/\r//" {} \;
rajeshkumar replied the topic: Re:Remove Control ^M from files
I used to do in shell using following command
> 1,$s/^M//g
Correct me if I am wrong
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
tpatil replied the topic: Re:Remove Control ^M from files
Yes, this is also correct command if you want to remove ^M from single file in VI edit mode.
Latest posts by scmgalaxy K (see all)
- Use of runtime variables to save into another variable using register in Ansible - September 6, 2018
- Ansible & Ansible Tower Variable Precedence Hierarchy - September 6, 2018
- How to use template in Ansible? - September 6, 2018