Portál AbcLinuxu, 7. května 2025 14:57
indexxMohl by mi prosím s tímto někdo pomoci? Děkuji.
Řešení dotazu:
for i in adresar/*.html; do sed -e '/indexx/d' -i "$i"; done
find adresar -name '*.html' -exec sed -e '/indexx/d' -i {} \;Popř. pokud by i adresář mohl končit
.html
, tak ještě přidat -type f
.
find /cesta/ku/adresaru/ -name '*.html' -exec echo {} \;V konkrétnom súbore potom "indexx" vynecháš cez grep:
grep -v "indexx" subor.htmlZbytok by mal byť relatívne jednoduchý.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.