New answers tagged

0

During development of eIDAS related code, i've came up with bash script, that decodes SSO (SingleSignOn) SAMLRequest param, which is usually encoded by base64 and raw-deflate (php gzdeflate) #!/bin/bash # file decode_saml_request.sh urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } if [[ $contents == *"SAMLRequest" ]]; then # extract param ...


5

Zutils (packaged in Debian) provides a more capable version of zgrep which supports all the usual contextual parameters: $ zgrep -C3 Fallout /usr/share/doc/intel-microcode/changelog.Debian.gz * New upstream microcode datafile 20190618 + SECURITY UPDATE Implements MDS mitigation (RIDL, Fallout, Zombieload), INTEL-SA-00223 CVE-2018-12126, ...


5

You can use zcat and a normal grep: zcat changelog.gz | grep -C3 "Fallout" -C3 tells grep to provide 3 lines of context (3 above, 3 below). Reduce this if you want less context. You can tailor this further by using -B<number> and/or -A<number> instead (for 'before' and 'after' respectively.)


5

It is also only a workaround, but did you try gzip -cd changelog.gz | grep -C <num_lines> "Fallout" to display num_lines of context before and after the match (use -A <num_after> and -B <num_before> to fine-tune)?


Top 50 recent answers are included