LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-08-2005, 10:48 PM   #1
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,188

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
text format


I use pico a lot for editing small texts, but each time I save under pico, it looks fine, until I open it in notepad in windows, the formatting is off, and there are always binary characters, How do I make pico save text formatting and as a pure text file like notepad does?

This is an example of what I did under pico

Code:
email addresses
email1@domain.com
email2@domain.com
but under notepad it would come out like this.. with weird binary characters
Code:
email addresses▐email1@domain.com▐email2@domain.com▐
So how do I get pico to save in a text format suitable for notepad?
 
Old 11-08-2005, 10:55 PM   #2
urticadioica
LQ Newbie
 
Registered: Oct 2005
Posts: 14

Rep: Reputation: 0
I think the problem is newlines. Windows (and Notepad) save text files with a different line break sequence than Unix has traditionally used. So while Notepad is saving newlines as CR/LF, Pico is probably saving it just as LF. I use vim personally, and there it's trivial to change. I'd imagine Pico has some option to use DOS/Windows style newlines, so you might search for that.

Good luck!
 
Old 11-08-2005, 11:00 PM   #3
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,188

Original Poster
Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
Cool, time for 'man pico' then
 
Old 11-08-2005, 11:16 PM   #4
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
It seems pico doesn't support to save as DOS text files. You could use sed to add the DOS end line characters after editing the file with pico:
Code:
sed -e 's@$@\r@g' -i file
You may want to check if nano supports that, nano is a pico clone with added functionality.
 
Old 11-09-2005, 06:56 AM   #5
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Wordpad usually will open *nix text files.
There is also programs like unix2dos and dos2unix to convert them.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Text to Speech to Mp3 ( Or any other CD Burnable Format) hubs99 Linux - Software 3 06-26-2005 12:40 PM
Converting PDF to text, rtf doc format saurya_s Linux - Software 2 06-16-2005 01:48 PM
How to view Rich Text Format documents edwal Linux - Newbie 1 04-06-2005 02:16 PM
win text editor that saves unix format novaprime Linux - Software 7 01-15-2005 04:30 PM
using sendmail I can't send email in Rich Text Format robmainella Linux - Software 4 09-09-2003 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration