find . -type f -print0 | xargs -0 perl -pi -e 's/old/new/g'
http://wooledge.org:8000/BashFAQ/021
http://linsovet.com/find_and_replace_text_in_multiple_files
http://www.faqs.org/docs/abs/HTML/sedawk.html
http://chaos.ssu.runnet.ru/cyr/KOI/book/sed.htm#5
http://www.opennet.ru/docs/RUS/bash_scripting_guide/a14586.html
http://www.citforum.ru/operating_systems/articles/sed_awk.shtml
http://forum.antichat.ru/thread56444.html
Примеры SED:
http://ant0.ru/sed1line.html
http://ant0.ru/sed_edit_interfaces.html
Переименование файлов:
http://docstore.mik.ua/orelly/perl/cookbook/ch09_10.htm
Дополнение:
rmnl — remove new line characters with tr, awk, perl, sed or C/C++
http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/
Result – Find all files that have a size >= 100MB:
http://wooledge.org:8000/BashFAQ/021
http://linsovet.com/find_and_replace_text_in_multiple_files
http://www.faqs.org/docs/abs/HTML/sedawk.html
http://chaos.ssu.runnet.ru/cyr/KOI/book/sed.htm#5
http://www.opennet.ru/docs/RUS/bash_scripting_guide/a14586.html
http://www.citforum.ru/operating_systems/articles/sed_awk.shtml
http://forum.antichat.ru/thread56444.html
Примеры SED:
http://ant0.ru/sed1line.html
http://ant0.ru/sed_edit_interfaces.html
Переименование файлов:
http://docstore.mik.ua/orelly/perl/cookbook/ch09_10.htm
Дополнение:
rmnl — remove new line characters with tr, awk, perl, sed or C/C++
http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/
Result – Find all files that have a size >= 100MB:
sudo find / -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
Комментариев нет:
Отправить комментарий