[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: [NOVICE] slette [] med sed ??



On Thu, 27 Jul 2000 16:53:33 +0200, Carsten Svaneborg wrote:
>Peter Seidler wrote:
>> Man skulle så tro, du kunne skrive:
>> sed s/\[TEST\]// minfil.log
>> sed s/\\[TEST]// minfil.log
>
>Spørgsmålet er om sed modtager input, eller om bash/tcsh fortolker
>input og sender det vidre til sed. Bash vil fortolke \\ som \ så
>sed modtager s/\[TEST]//

DOUGH! Nå ja, det er klart.

>
>sed 's/\[TEST\]//' betyder at shell skal køre sed med '..' 
>som argument men uden at pille i hvad der står inden i '..'.

Ja ja, jeg ved det (men det kunne du jop ikke vide)

>
>Analogt hvad er forskellen mellem:
>echo  *
>echo '*'
>echo "*"
>
>Din shell vil substituere * med alle filer i kataloget. Men kun
>i det første eksempel. (Jeg kan ikke huske hvad der sker i det
>tredie eksempel).

Checkede lige man bash

i '..' bibeholdes den bogstavelige værdi af hvert tegn. ' må ikke proppes
ind i '..' helle ikke i form af \'

i ".." bibeholdes den bogstavelige værdi af alle tegn undtagen $, ` og \ .
(...)
Så her substitueres * ikke - kun env. variable og output fra kommandoer
i `..`

>
>-- 
>     __  ____    ___           __           sslug@sslug
> __ / / / __/   / _ )___ _____/ /      24h Maraton på DR2 fra 28/7 kl 7 
>/ // / _\ \_   / _  / _ `/ __/ _ \     Værker: Brandenburg koncerterne
>\___(_)___(_) /____/\_,_/\__/_//_/          h-mol messen og andet.
>
>


-- 
	Peter Seidler


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:59 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] *