Saturday 5 February 2011

end-of-line character conversion: unix2mac dos2unix mac2unix

All these scripts are one liners:


"mac2unix"
cat $1 | tr '\r' '\n'

"unix2mac"
cat $1 | tr '\n' '\r'

"dos2unix"
cat $1 | tr -d '\r'

NOTE: "tr" (translate character) utility.

No comments:

Post a Comment

Azure OpenAI Architecture Patterns & Deployment Patterns

Sharing some useful links that will help customers architect Azure OpenAI solution using the best practices: (1) Azure OpenAI Landing Zone r...