# HG changeset patch # User Henry S. Thompson # Date 1618390663 0 # Node ID 5384208a083482f304664b9f5dfaa80d178741da # Parent 90f8f28b2e51dc073d665f74ae6f819f8ccd3906 -w and -h working diff -r 90f8f28b2e51 -r 5384208a0834 bin/ix.sh --- a/bin/ix.sh Tue Apr 13 17:52:31 2021 +0000 +++ b/bin/ix.sh Wed Apr 14 08:57:43 2021 +0000 @@ -35,7 +35,7 @@ dd if="$f" of=/dev/stdout skip=$o count=$l \ iflag=skip_bytes,count_bytes 2>/dev/null done | unpigz -dp 1 -c | \ -s="w" +{ s="w" if [ -n "$p" ] then while read -r L @@ -54,7 +54,7 @@ fi continue fi - if [ "$s" = "b" ] + if [ "$s" = "h" ] then # HTTP header case "$L" in @@ -63,7 +63,7 @@ bl=${bl%%*([ [:space:]])} ;; esac - if [ -n "$w" ] + if [ -n "$h" ] then printf "%s\n" "${L%% }" fi @@ -80,5 +80,7 @@ fi done else - cat -fi # No flags,the whole thing + # No flags,the whole thing + cat +fi +}