Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

****************Got the opportunity to pen a Book on Database Cloud Services.......More details to follow.***************

Title : Database Cloud Revealed
Publisher : Apress
Release Date : Jan-2020

**********************************************************************************


My Cloud Certifications:

AWS Certified Solutions Architect Associate

Azure Certified Architect

Azure Certified Administrator

Oracle Cloud Infrastructure 2018 Certified Architect Associate.

Oracle Cloud Infrastructure Classic 2018 Certified Architect Associate.

Oracle Database Cloud Administrator Certified Professional.

Oracle Database Cloud Service Operations Certified Associate.

Search This Blog

Monday, May 17, 2010

Remove ^M character from UNIX

To remove ^M characters in UNIX

To get the ^M in unix ( press control+V control+m ) i.e ctrlv & ctrlm on your keyboard(no spaces in between)

do anyone of the following:

dos2unix filename ( not all unix flavors have dos2unix by default)

or
sed 's/^M//g' ${INPUT_FILE} > tmp.txt
mv tmp.txt ${INPUT_FILE}

or
tr -d "\15" < ${INPUT_FILE} > tmp.txt;
mv tmp.txt ${INPUT_FILE}

or

perl -p -i -e 's/^M//g' ${INPUT_FILE}
or

multiple files in a directory

This will remove all the ^M from each file.
perl -p -i -e 's/^M//g' *