newline


 
Thread Tools
Contact Us Forum Support Area for Unregistered Users & Account Problems newline
# 1  
Old 05-04-2008
newline

I have an old file originally created in vi but read and saved by a word processor at some point.

I have ^Ms and know how to substitute them for anything I wish but I still only have one long line when viewed in vi.

So I suppose I need to substitute a newline for each ^M but I don't know the code to use.

Shouldn't make any difference but I'm using vi in MAC OSX Leopard.
# 2  
Old 05-04-2008
i) Open this file in some word processor or advanced text editor. Select "unix newlines", "unix charset", "unix style" or something like that in the "Save as"-dialog when saving.
ii) use some script like dos2unix (dostounix, dos2ux, ..)
# 3  
Old 05-04-2008
This forum is for NON technical questions only! Thread closed...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Newline in the file

I have requirement to remove the /n ( newline ) characters from the file. When I open file in VI .. I want to see newline char how to display newline char .. or where can I see the content with newline char visible? (3 Replies)
Discussion started by: freakabhi
3 Replies

2. Shell Programming and Scripting

echo without newline

I am trying to make a download progress meter with bash and I need to echo a percentage without making a newline and without concatenating to the last output line. The output should replace the last output line in the terminal. This is something you see when wget or curl downloads files.... (6 Replies)
Discussion started by: locoroco
6 Replies

3. Solaris

grep result in newline

Hi While trying to do a search on solaris, the grep results seems to be appearing on the same line instead of the new line. Wed Jan 18 14:45:48 weblogic@test:/abcd$ grep qainejb02 * qa_cluster_biz_view_tc_intl_servers_ports_2:qainejb02 7101 qa_cluster_servers_2:qainejb02... (2 Replies)
Discussion started by: ganga.dharan
2 Replies

4. Shell Programming and Scripting

Removing ^M and the newline that follows it.

Hi Gurus, Apologies as I feel like this must be answered already on here somewhere but I just can't find it. I find many people looking to remove all \n and \r (CR and LF) or one or the other but the only times I've found someone trying to remove them only when both are together they've found... (7 Replies)
Discussion started by: Leedor
7 Replies

5. Shell Programming and Scripting

sed newline

Hi everyone, I'd like to use the script validatehtml which returns either the given url is HTML strict or not, using http:// validator . w3 . org . sh validatehtml #!/bin/bash wget -q http:// validator . w3 .org / check?uri=$1 cat check\?uri\=$1 | sed -n '/h2/ p' | sed 's/ */ /g' | sed... (2 Replies)
Discussion started by: azertyazerty
2 Replies

6. Shell Programming and Scripting

replace >< with > newline <

Hi All, I have the command in PERL for performing this, but Can you please suggest me how can i perform this using AWK: My input xml file looks like this: <aaa>hello</aaa><bbb>hai</bbb> I want the output like this ( means need new line after end of each xml tag): <aaa>hello</aaa>... (1 Reply)
Discussion started by: HemaV
1 Replies

7. UNIX for Dummies Questions & Answers

newline in echo

Hi all, I have a scripts in csh and whenI do echo command I want to add newline. I used to do it like this: #! /bin/csh echo "\n\n WHAT AREA DO YOU WANT:\n\n" echo -n " YOUR CHOISE : " set area=$< but since weupgrade the oracle to 10g it doesn't do the newline (he print the\n as a... (5 Replies)
Discussion started by: rikyer
5 Replies

8. Shell Programming and Scripting

Insert two newline after some pattern

Hi, I need to insert two newline characters after matching of a pattern in each line of a file. Eg. If i have a file with contents as follows:- Now, i want output as follows :- i.e., I need to insert two newline characters after the occurance of pattern "</Message>>". Thnx... (1 Reply)
Discussion started by: DTechBuddy
1 Replies

9. UNIX for Dummies Questions & Answers

newline character

hi, I want to print the below lines "Message from bac logistics The Confirmation File has not been received." When i give like this in the code "Message from bac logistics\n The Confirmation File has not been received." It is giving only Message from bac logistics\n The... (9 Replies)
Discussion started by: trichyselva
9 Replies

10. Shell Programming and Scripting

replace a newline (\n)

dear all: maybe i have a file like : 12 34 56 78 end how do write can i replace newline into NA : make the file inte : 12 NA 34 NA 56 78 END (3 Replies)
Discussion started by: jeter
3 Replies
Login or Register to Ask a Question