#altera a string 200 pela string 100 for i in ` grep “200” -R * |awk -F: ‘{print $1}’ |uniq` do cp $i ${i}.bkp cp $i ${i}.new sed “s/200/100/g” ${i}.new > $i…
Tag: string
iptables filtrar pacote por palavra (string) – identificar torrent na rede
iptables -A FORWARD -m string –algo bm –string “BitTorrent” -j LOG –log-prefix “torrent” iptables -A FORWARD -m string –algo bm –string “peer_id=” -j LOG –log-prefix “torrent” iptables -A FORWARD -m string –algo…
editor vim substituir strings por enter ou return
Para entrar na “linha de comandos” do editor VIM (ou VI): use a tecla “ESC” para sair do modo de edição e então digite : o comando para substituir fica: :%s/PALAVRA_ORIGINAL/PALAVRA_NOVA/g onde…