diff --git a/bin/flac2ogg.sh b/bin/flac2ogg.sh index 20790e1..61188f1 100644 --- a/bin/flac2ogg.sh +++ b/bin/flac2ogg.sh @@ -46,7 +46,7 @@ if [ -t 0 ]; then done fi else - while read -r flac; do + while IFS= read -r flac; do [ -f "$flac" ] || err "$flac: not found" convert_to_ogg "$flac" || rc=$? done diff --git a/utils/openbsd/hotplug/trunk_urndis_hotplug.sh b/utils/openbsd/hotplug/trunk_urndis_hotplug.sh index 1418685..4454440 100644 --- a/utils/openbsd/hotplug/trunk_urndis_hotplug.sh +++ b/utils/openbsd/hotplug/trunk_urndis_hotplug.sh @@ -23,7 +23,7 @@ renew_dhcp_if_needed() { iface=$1 hostname_if=/etc/hostname."$iface" [ ! -r "$hostname_if" ] && return - while read -r line; do + while IFS= read -r line; do [ "$line" = dhcp ] && dhclient "$iface" && break done <"$hostname_if" } diff --git a/utils/scripts/sekrit-rekey.sh b/utils/scripts/sekrit-rekey.sh index 8ac0a7e..e11bc2e 100644 --- a/utils/scripts/sekrit-rekey.sh +++ b/utils/scripts/sekrit-rekey.sh @@ -38,7 +38,7 @@ scratch=$(mktemp -tp "$newdir" .sekrit-scratch-XXXXXXXXXX) || err "failed to create scratch file" trap 'rm -fr -- "$scratch" "$newdir"' INT QUIT TERM -sekrit ls | while read -r entry; do +sekrit ls | while IFS= read -r entry; do printf "%s... " "$entry" sekrit get "$entry" >|"$scratch" || err "failed to export entry $entry" diff --git a/utils/scripts/x-dpi-facesizes.sh b/utils/scripts/x-dpi-facesizes.sh index 7a32371..8e0a5b0 100644 --- a/utils/scripts/x-dpi-facesizes.sh +++ b/utils/scripts/x-dpi-facesizes.sh @@ -38,7 +38,7 @@ FACESIZES="8.0 4.0 6.0 7.0 8.0 9.0 10.0 12.0" basedpi=$(xdpyinfo | grep '^ resolution:' | { min= - while read -r line; do + while IFS= read -r line; do set -- $line dpi_x=${2%%x*} dpi_y=${2##*x} @@ -66,7 +66,7 @@ for facesize in $FACESIZES; do done | bc -l | { i=0 printf "Xft.dpi:\t%.1f\n" "$targetdpi" - while read -r v; do + while IFS= read -r v; do if [ $i -eq 0 ]; then printf "XTerm.VT100.faceSize:\t%f\n" "$v" else diff --git a/utils/scripts/zone-serial-number-hook.sh b/utils/scripts/zone-serial-number-hook.sh index 5ee7cbf..113f051 100644 --- a/utils/scripts/zone-serial-number-hook.sh +++ b/utils/scripts/zone-serial-number-hook.sh @@ -64,7 +64,7 @@ zonefile_regex=$(git config --default '\.zone$' hooks.zonefileregex) needs_serial_bump=$(git diff-index --name-only --cached "$against" | grep -E -- "$zonefile_regex" | { rc=0 - while read -r filename; do + while IFS= read -r filename; do old=$(get_serial "$against:$filename") new=$(get_serial ":$filename") if bc_cmp "$new" "<=" "$old"; then diff --git a/xdg-config-dir/herbstluftwm/autostart b/xdg-config-dir/herbstluftwm/autostart index 66255b7..944a8d3 100755 --- a/xdg-config-dir/herbstluftwm/autostart +++ b/xdg-config-dir/herbstluftwm/autostart @@ -169,7 +169,7 @@ hc unlock hc detect_monitors -hc list_monitors | while read -r line; do +hc list_monitors | while IFS= read -r line; do m=${line%%:*} sh ~/.config/herbstluftwm/herbstpanel.sh "$m" & done