vi und cr/lf's

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
Post Reply
tobias111
Posts: 78
Joined: 2002-12-02 20:19
 

vi und cr/lf's

Post by tobias111 »

hallo leute,

wie kann ich mit vi (oder einem anderen editor) "visualisieren, ob am ende einer zeile
ein line feed oder ein carriage return gemacht worden ist?
wie kann ich automatisiert line feeds durch carriage returns ersetzen?

danke
to
phisch
Userprojekt
Userprojekt
Posts: 41
Joined: 2002-06-07 17:45
Location: Flagstaff
 

Re: vi und cr/lf's

Post by phisch »

der vim sollte es dir sagen, nach dem öfnen der Datei steht unten ein

Code: Select all

dateiname.txt [dos]
bzw das [dos] fehlt, wenn es nur lf sind.

mit

Code: Select all

:set fileformat=unix
bzw

Code: Select all

:set fileformat=dos
kannst du umstellen.



phisch
scythe42
Posts: 154
Joined: 2002-10-14 18:30
Location: Internet
Contact:
 

Re: vi und cr/lf's

Post by scythe42 »

dos2unix inputfile outputfile
unix2dos inputfile outputfile

...und LF <> CR/LF Konvertierung ist gegessen...
tobias111
Posts: 78
Joined: 2002-12-02 20:19
 

Re: vi und cr/lf's

Post by tobias111 »

tausend dank!!
Post Reply