[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [VI] Fjerne ^M'er i enden af en linie



> From sslug@sslug  Mon May 27 17:51:05 2002
> Subject: Re: [VI] Fjerne ^M'er i enden af en linie
>
> On Mon, 27 May 2002 17:46:01 +0200
> Hanne Munkholm <sslug@sslug> wrote:
> > hej sslug-vi
> > 
> > Hvis man har nogle filer der kommer fra Windows, og har et ^M i enden
> > af hver linie, hvordan kan man så lettest fjerne disse inde fra vi?
> > Kan man med een eller få kommandoer slette "alle ^M'er i denne fil"
> > eller hedder det "sidste tegn på alle linier", og hvad hvis der er
> > nogle få linier hvor det ikke er på? 
> > 
> > TIA,
>
> jeg plejer at bruge
>
> tr '\r' ' ' < indfil > udfil
>

Eller endnu bedre

(i vim)

:se ff=unix

(ff for fileformat).


-- 
   _______
  /       \    Michael Westergaard <sslug@sslug>
 / /|/|  \ \   http://klafbang.dk/
( ( ` |   ) )
 \ \  |/\/ /   Mit ur går stadig efter vintertid. Det giver en
  \_______/    dejlig, men falsk, følelse af at have god tid.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *