How to convert Carriage Returns to Line Feeds and vice versa
This document (3526475) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Server 10
Situation
Resolution
To convert a file from UNIX to DOS format do the following steps:
1. Open a terminal and type "su" and then when prompted enter the root password.
2. Type "unix2dos -k "
3. Print the file by typing "lp -d "
To convert a file from DOS to UNIX format do the following steps:
1. Open a terminal and type "su" and then when prompted enter the root password.
2. Type "dos2unix -k "
3. Print the file by typing "lp -d "
Please note that SLE10 does not have the unix2dos utility included. It will be necessary to obtain the rpm from another source. The unix2dos will not be added to future releases because text file conversion tools like iconv and recode already exist in SLE10. These can perform the same functions as unix2dos and dos2unix.
2. Type "recode lat1..ibmpc "
3. Print the file by typing "lp -d "
1. Open a terminal and type "su" and then when prompted enter the root password.
2. Type "recode ibmpc..lat1 "
3. Print the file by typing "lp -d "
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:3526475
- Creation Date: 27-Feb-2008
- Modified Date:04-Mar-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com