Welcome, Guest. Please login or register.
+  Linux Soft Forum
|-+  Cercetează» Întrebări de bază» sed
[Picture 161] [Picture 160] [Picture 159]
Username:
Password:
 
Pages: [1]   Go Down
  Print  
Author Topic: sed  (Read 2076 times)
0 Members and 1 Guest are viewing this topic.
ioask4it
Membru
*

sed
« on: March 26, 2009, 04:09:57 PM »

salut
din comanda sed -e "s/[0-9]*//g" ce face acel g?
multam
Logged
oblio
Admini
**


WWW
« Reply #1 on: March 26, 2009, 05:05:10 PM »

Quote from: he :s
[g]   Replace all occurrences in the line.

g
    Apply the replacement to all matches to the regexp, not just the first.

Recunosc că e super scârbos pentru un începător, a durat ceva până am putut combina key word-urile pentru a găsi ceva relevant ca să-ţi pot da un link. Ca referinţă, g e un flag (opţiune) pentru comanda "s" a sed.

Un indiciu bun e să arunci un ochi pe la FSF pe site, cam tot ce e utilitar de bază în linie de comandă pe Linux e GNU, şi probabil are un manual (vezi cazul sed de mai sus).
« Last Edit: March 26, 2009, 05:06:12 PM by oblio » Logged

Distribuţie: ubuntu | Localitate: Bucureşti | Vârstă: 24

Oh! Everything has a point, and if it doesn't, then there's a point to it.

Oblio's
Master of the Darkside
Membru
*

almost retired


« Reply #2 on: March 26, 2009, 05:21:41 PM »

http://www.ibm.com/developerworks/linux/library/l-sed1.html
http://www.grymoire.com/Unix/Sed.html#uh-0

Logged

steelheart
Membru
*


« Reply #3 on: March 26, 2009, 10:08:49 PM »

hahaha, toata lumea are acuma cursul de Sisteme de Operare?

g-ul ala vine de la global, iar sedul astfel (cu g), iti ilocuieste in fisier fiecare aparitie a patternului cautat, altfel iti inlocuieste doar prima aparitie cu ce vrei tu.

Logged

When Bush says "Freedom" it means "Conquer".
When Gates says "Freedom" it means "Feedom".
But when Stallman says "Freedom" it means "Freedom".
Pages: [1]   Go Up
  Print  
 
Jump to: