/
hubbitus
/
shell.scripts
Обзор
Документация
Войти
/
hubbitus
/
shell.scripts
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
chrome-cache-get-content
14 строк
667 B
Pavel Alexeev
Add chrome-cache-get-content
17 окт 2010, 18:38
17 окт 2010, 18:38
1dd2b89
Код
Авторство
О чём код?
#!/bin/bash # After save HTML page from Google Chrome browser in about:cache with content it script allow cut real content from it. : ${1?"You must provide file argument: `basename $0` target-file"} unset comment replace_in_file \ -w '#.*?(?:<pre>.+?</pre><hr>){2}<pre>(.*?)</pre>.*?$#s' -t '$1' \ -w '/^.{11}(.{64}).*?$/ms' -t '$1' ${comment:'Remove offsets and ASCII representation'} \ -w '/\n/' -t '' ${comment:'In one long line'} \ -w '/ *$/' -t ' ' ${comment:'Delete spaces from last string what is aligment'} \ -w '/([\da-f]{2}) /ie' -t 'chr(hexdec("$1"))' ${comment:'Only from HEX codes we can reproduce full binary source'} \ "$1" > "$1.content"