Mercurial > hg > cc > cirrus_home
changeset 90:5384208a0834
-w and -h working
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Wed, 14 Apr 2021 08:57:43 +0000 |
parents | 90f8f28b2e51 |
children | 82c94684f799 |
files | bin/ix.sh |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 +}