Portál AbcLinuxu, 10. listopadu 2025 08:54
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.