[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: [TEKNIK] Transmogriffe linux bash scripts til mac bash scripts



On 2012-02-14 22:18, Eskild Nielsen wrote:
> JEg havde lavet en serie af bash scripts på min linux laptop, og ville prøve at køre dem
> på en MAC
> 
> Succesen var mildest talt behersket, idet  sed virker temmelig anderledes


Mac bruger hverken unix linieskift \n eller windows/Dos \r\n


> Jeg skulle blandt andet indsætte et linieskift i en textfil, hver gang der var >< i filen
> 
> på linux: sed 's!><!>\n<!g' filnavn
> 
> men på mac bliver \n ikke opfattet som kontoltegn, men bliver taget for pålydende
> 
> jeg har prøvet at skrive \o013 i  stedet - det virkede heller ikke....
> 

spørgsmålet er om sed på Mac forstår Mac linieskift
og om de filer du har er Mac tekst-filer, eller de kommer fra dos/windows/unix ?

prøv at checke med :   hexdump -C fil | less



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2012-03-01, 02:01 CET [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] *