[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



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? 

:%s/.$//g

>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å? 

hmm. Hvad med at fjerne det sidste tegn hvis det ikke er printable, så
vidt jeg kan se burde det (i vim) være:

:%s/[^\p]$//g

men det virker ikke.
-- 
Anders Bo Rasmussen


 
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] *