Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (19 sloc) 597 Bytes
#!/bin/bash
#-----------------------------------------------------------------------
# Script Name : clnM.sh
# Author : Atul Singh
# Date : 30-May-2017
# Usage : clnM.sh <FILE>
# Description : Remove ctrl-M character from file
#-----------------------------------------------------------------------
FILE="$1"
echo ""
echo "Removing ^M characters from file $FILE......."
sed 's/
//g' "$FILE" > "$FILE"_
mv "$FILE"_ "$FILE"
rm -f "$FILE"_
echo "***********Task Completed*******************"
echo ""
# Thanks
# Atul Singh
You can’t perform that action at this time.