Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Grep w php?
radgum
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 3.06.2004
Skąd: Gdańsk

Ostrzeżenie: (0%)
-----


Czy istnieje instrukcja "grep" w php?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

np. jak wykonać coś takego w php:

$xx= iptables -vxnL | grep "192.168.1.10" | awk '{print $2}'

Szukam, szukam, studiuje ksiąki i nie moge nic sensownego znaleźć.
CHYBA SŁABO SZUKAM. (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Oczywiście nie interesuje mnie rozwiązanie typu

$xx= `iptables -vxnL | grep "192.168.1.10" | awk '{print $2}'`
ewentualnie :

$xx= `iptables -vxnL`

i dalej już instrukcjami php
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
cichy
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 197
Pomógł: 0
Dołączył: 9.09.2003
Skąd: z Marsa

Ostrzeżenie: (0%)
-----


można poprzez np system() lub exec()
lub poprzez ` `

Pozdro
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 3.10.2025 - 08:41