UNIX Learning
Wednesday, August 10, 2011
UNIX script: transfer DOS file to UNIX file
/usr/bin/dos2unix -437 "$dosfile" $unixfile
or
tr -d '\r' < "$dosfile" > $unixfile
or
sed 's/^M$//' "$dosfile" > $unixfile
or
perl -pi -e 's/\r\n/\n/g' "$dosfile" > $unixfile
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment