LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-09-2003, 02:29 PM   #1
BoldKiller
Member
 
Registered: Apr 2002
Location: Montreal, Quebec
Distribution: Debian, Gentoo, RedHat
Posts: 142

Rep: Reputation: 15
Windows text file


I have run in a bit of a proble.

I have written a shell script on a windows machine (was not at home, had only linux under the hand). When it was finished, I uploaded it via FTP.

No back on the linux boc, I try to run the script. It did not worked due to the presence of the 2nd end of line caractere used by windows. (CR LF for windows VS CR only for linux) (think it's CR I smetime mix them up)

Anyway, is there a quick way to suppres all of these from the script?? I mean other then rewriting. I'm using vim at command line.

thank you.
 
Old 05-09-2003, 02:34 PM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Are you getting the ^M characters at the end of every line? If so have a look at this thread.
 
Old 05-09-2003, 02:57 PM   #3
BoldKiller
Member
 
Registered: Apr 2002
Location: Montreal, Quebec
Distribution: Debian, Gentoo, RedHat
Posts: 142

Original Poster
Rep: Reputation: 15
thanks, thats going to be handy!
 
Old 05-09-2003, 03:43 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
For Windows, download Textpad. Then for future scripts save your text files for the OS you desire.
 
Old 05-09-2003, 03:45 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
NoteTab Lite is pretty good too.
http://www.notetab.com/
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 11:28 AM
How to convert binary text file from Windows marie@dk Linux - Software 2 10-12-2005 03:17 AM
storing text in a text file for a specified length of time. mrobertson Programming 7 08-02-2005 10:27 AM
How to find and change a specific text in a text file by using shell script Bassam Programming 1 07-18-2005 07:15 PM
Replace text of unknown content with other text in file brian0918 Programming 15 07-14-2005 09:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:26 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