LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2014, 07:52 PM   #1
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

Rep: Reputation: Disabled
The file transfer from win to linux strangely line break


My text code is
Code:
file/read-case-data cross_good_lessmesh-9000.cas
file/export/ascii 9000_wall1.txt 2 () no pressure-coefficient q no yes
file/export/ascii 9000_wall2.txt 1 () no pressure-coefficient q no yes
But then it becomes as follows in linux, why?

Code:
file/read-case-data cross_good_lessmesh-9000
.cas
file/export/ascii 9000
_wall1.txt 2 () no pressure-coefficient q no yes
file/export/ascii 9000
_wall2.txt 1 () no pressure-coefficient q no yes
 
Old 03-10-2014, 07:56 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,814
Blog Entries: 13

Rep: Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950Reputation: 2950
What are you using to view the file on Linux and what distro/version of Linux are you running?
 
Old 03-10-2014, 08:21 PM   #3
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
What are you using to view the file on Linux and what distro/version of Linux are you running?
Using the winscp internal editor and

Quote:
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2
LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64"
 
Old 03-10-2014, 08:58 PM   #4
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ytyyutianyun View Post
My text code is
Code:
file/read-case-data cross_good_lessmesh-9000.cas
file/export/ascii 9000_wall1.txt 2 () no pressure-coefficient q no yes
file/export/ascii 9000_wall2.txt 1 () no pressure-coefficient q no yes
But then it becomes as follows in linux, why?

Code:
file/read-case-data cross_good_lessmesh-9000
.cas
file/export/ascii 9000
_wall1.txt 2 () no pressure-coefficient q no yes
file/export/ascii 9000
_wall2.txt 1 () no pressure-coefficient q no yes
I find the reason because when I use regular expression. I use the "^(%*$^)" to replace. But it is wrong.
And I use the "%^(*^)$" and it is ok.
 
Old 03-10-2014, 09:00 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

I guess you have newline characters after each "9000". Perhaps these aren't visible in windows because it also expects a carriage return.

So:
- As Frank already asked, what are you using to view the file on linux?
- Please post the output of:
Code:
cat --show-nonprinting file.txt
where file.txt is the file in question.

Evo2.
 
Old 03-11-2014, 02:08 AM   #6
ytyyutianyun
Member
 
Registered: Nov 2011
Posts: 63

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

I guess you have newline characters after each "9000". Perhaps these aren't visible in windows because it also expects a carriage return.

So:
- As Frank already asked, what are you using to view the file on linux?
- Please post the output of:
Code:
cat --show-nonprinting file.txt
where file.txt is the file in question.

Evo2.
Thanks, a great code now I know.
 
  


Reply

Tags
transfer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Is It possible to continue the SCP transfer process once break?? anishkumarv Linux - Server 3 07-24-2011 12:00 PM
javascript line break secretlydead Programming 1 02-25-2011 09:12 AM
Samba / slow data transfer between Linux machines, Win<-->Linux ok KMBS Linux - Networking 6 04-30-2010 10:34 AM
Can I transfer files from win to linux?(Noob) Normal Linux - Networking 14 09-10-2007 12:39 AM


All times are GMT -5. The time now is 07:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration