Add empty IFS for single var reads
This commit is contained in:
parent
134c479e36
commit
49d068aad3
@ -46,7 +46,7 @@ if [ -t 0 ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
while read -r flac; do
|
while IFS= read -r flac; do
|
||||||
[ -f "$flac" ] || err "$flac: not found"
|
[ -f "$flac" ] || err "$flac: not found"
|
||||||
convert_to_ogg "$flac" || rc=$?
|
convert_to_ogg "$flac" || rc=$?
|
||||||
done
|
done
|
||||||
|
@ -23,7 +23,7 @@ renew_dhcp_if_needed() {
|
|||||||
iface=$1
|
iface=$1
|
||||||
hostname_if=/etc/hostname."$iface"
|
hostname_if=/etc/hostname."$iface"
|
||||||
[ ! -r "$hostname_if" ] && return
|
[ ! -r "$hostname_if" ] && return
|
||||||
while read -r line; do
|
while IFS= read -r line; do
|
||||||
[ "$line" = dhcp ] && dhclient "$iface" && break
|
[ "$line" = dhcp ] && dhclient "$iface" && break
|
||||||
done <"$hostname_if"
|
done <"$hostname_if"
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ scratch=$(mktemp -tp "$newdir" .sekrit-scratch-XXXXXXXXXX) ||
|
|||||||
err "failed to create scratch file"
|
err "failed to create scratch file"
|
||||||
trap 'rm -fr -- "$scratch" "$newdir"' INT QUIT TERM
|
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"
|
printf "%s... " "$entry"
|
||||||
sekrit get "$entry" >|"$scratch" ||
|
sekrit get "$entry" >|"$scratch" ||
|
||||||
err "failed to export entry $entry"
|
err "failed to export entry $entry"
|
||||||
|
@ -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:' | {
|
basedpi=$(xdpyinfo | grep '^ resolution:' | {
|
||||||
min=
|
min=
|
||||||
while read -r line; do
|
while IFS= read -r line; do
|
||||||
set -- $line
|
set -- $line
|
||||||
dpi_x=${2%%x*}
|
dpi_x=${2%%x*}
|
||||||
dpi_y=${2##*x}
|
dpi_y=${2##*x}
|
||||||
@ -66,7 +66,7 @@ for facesize in $FACESIZES; do
|
|||||||
done | bc -l | {
|
done | bc -l | {
|
||||||
i=0
|
i=0
|
||||||
printf "Xft.dpi:\t%.1f\n" "$targetdpi"
|
printf "Xft.dpi:\t%.1f\n" "$targetdpi"
|
||||||
while read -r v; do
|
while IFS= read -r v; do
|
||||||
if [ $i -eq 0 ]; then
|
if [ $i -eq 0 ]; then
|
||||||
printf "XTerm.VT100.faceSize:\t%f\n" "$v"
|
printf "XTerm.VT100.faceSize:\t%f\n" "$v"
|
||||||
else
|
else
|
||||||
|
@ -64,7 +64,7 @@ zonefile_regex=$(git config --default '\.zone$' hooks.zonefileregex)
|
|||||||
needs_serial_bump=$(git diff-index --name-only --cached "$against" |
|
needs_serial_bump=$(git diff-index --name-only --cached "$against" |
|
||||||
grep -E -- "$zonefile_regex" | {
|
grep -E -- "$zonefile_regex" | {
|
||||||
rc=0
|
rc=0
|
||||||
while read -r filename; do
|
while IFS= read -r filename; do
|
||||||
old=$(get_serial "$against:$filename")
|
old=$(get_serial "$against:$filename")
|
||||||
new=$(get_serial ":$filename")
|
new=$(get_serial ":$filename")
|
||||||
if bc_cmp "$new" "<=" "$old"; then
|
if bc_cmp "$new" "<=" "$old"; then
|
||||||
|
@ -169,7 +169,7 @@ hc unlock
|
|||||||
|
|
||||||
hc detect_monitors
|
hc detect_monitors
|
||||||
|
|
||||||
hc list_monitors | while read -r line; do
|
hc list_monitors | while IFS= read -r line; do
|
||||||
m=${line%%:*}
|
m=${line%%:*}
|
||||||
sh ~/.config/herbstluftwm/herbstpanel.sh "$m" &
|
sh ~/.config/herbstluftwm/herbstpanel.sh "$m" &
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user