LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2009, 07:57 AM   #1
Lord Firestorm
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
Littel copy past program in shell


Hi there,
i have an issue with some text files. Actually they are fortran code and they don't work properly because they were programmed under windows and i am on linux now. The thing is that i can get them to work by opening each file (*.f) select all copy all open new text file paste all and save it under the same name (*.f). If it would be one file no problem but i have roughly 160. I thought about a little shell program that would do the job for me. Any ideas?
 
Old 12-08-2009, 11:37 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
This is quite likely a case of DOS CR-LF end of lines, vs Linux LF end of lines. There is probably a utility installed on your distro to do this job. My OpenSuse distro has dos2unix. Should take no more than a single commandline to complete the job.
--- rod.
 
Old 12-08-2009, 01:11 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
"flip" is another tool that does the same thing. Or you can even use sed to do it (look under TEXT CONVERSION, 1/2 a page down).
 
  


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
how to copy-past on command line? jameshao Linux - Newbie 5 02-01-2009 03:55 PM
How to Copy and Past ? I cannot do anything redlynch Linux - Newbie 8 07-25-2008 06:23 AM
Qcad copy and past? kalleanka Linux - Software 2 10-07-2006 07:43 AM
Gimp2.2 amd Copy & Past to OpenOffice ReporterX SUSE / openSUSE 1 12-29-2004 04:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:58 PM.

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