31.10.2014 Views

Operációs rendszerek Gyakorlat

Operációs rendszerek Gyakorlat

Operációs rendszerek Gyakorlat

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Keresés (find) – VII.<br />

●<br />

Pipe és -exec<br />

● find … -exec head -n 3 ”{}” | tail -n 1 \;<br />

A fájlok 3. sorát írná ki, de ez így nem működik.<br />

● find … -exec sh -c 'head -n 3 ”{}” | tail -n<br />

1' \;<br />

Indítunk egy belső shellt (sh), aminek megadjuk, hogy<br />

milyen parancsot futtasson (-c). Így pipe-os parancsot is<br />

tudunk futtatni az exec paramétereként.<br />

Operációs <strong>rendszerek</strong> gyakorlat 73

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!