来自专业的译者、企业、网页和免费的翻译库。
antud kontekstis kasutatakse ainult sed 'i' asenduskäsku: sed 's / regulaaravaldis / asendus / lipud' enne uue käsu kasutamist & kdiff3; - ga võiks seda esmalt testida konsoolil. siin tuleb kasuks käsk echo. näide: echo abrakadabra _bar_ sed 's/ a/ o /' - > obrakadabra toodud näites on tegemist äärmiselt lihtsa sed- käsuga, kus asendatakse esimene "a" "o" - ga. kui soovid asendada kõik esinemiskorrad, tuleb kasutada lippu "g": echo abrakadabra _bar_ sed 's/ a/ o/ g' - > obrokodobro sümbol "_bar_" on torukäsk, mis edastab eelmise käsu väljundi järgmise käsu sisendile. kui soovid testida pikema failiga, võid kasutada käsku cat, kui tegemist on unix- i süsteemiga, või type, kui tegu on windowsiga. sed sooritab asenduse igal real.
in this context only the sed -substitute-command is used: sed's/ regexp / replacement / flags 'before you use a new command within & kdiff3;, you should first test it in a console. here the echo -command is useful. example: echo abrakadabra _bar_ sed's/ a/ o/' - > obrakadabra this example shows a very simple sed-command that replaces the first occurance of "a" with "o". if you want to replace all occurances then you need the "g"-flag: echo abrakadabra _bar_ sed's/ a/ o/ g '- > obrokodobro the" _bar_"-symbol is the pipe-command that transfers the output of the previous command to the input of the following command. if you want to test with a longer file then you can use cat on unix-like systems or type on windows-like systems. sed will do the substitution for each line.