# HG changeset patch # User Pascal Bellard # Date 1571567757 -7200 # Node ID aa81af0a90f9fe60f23f29bc08e6ccbf996062e1 # Parent 7cbf5f11d5433bb0a33733aebc1d4a268678cfbe Remove cat process diff -r 7cbf5f11d543 -r aa81af0a90f9 tazbox/tazbox --- a/tazbox/tazbox Mon Apr 15 10:15:58 2019 +0200 +++ b/tazbox/tazbox Sun Oct 20 12:35:57 2019 +0200 @@ -70,7 +70,7 @@ system_desktop=$(find /usr/share/applications \ -name ${1##*/}.desktop 2&>/dev/null | head -n1) desktop="${local_desktop:-$system_desktop}" - [ -n "$desktop" ] && cat $desktop | sed '/\[Desktop\ Entry\]/,/^\[/!d' | \ + [ "$desktop" ] && sed '/\[Desktop\ Entry\]/,/^\[/!d' $desktop | \ sed '/^Icon=/!d' | head -n1 | cut -d= -f2 } @@ -384,13 +384,13 @@ grep -m1 $(basename $tzfile) $ztab done | cut -d$'\t' -f1 | sort -u > $tmpcc - for CC in $(cat $tmpcc); do + while read CC; do cat << EOT $CC $CC $(grep -m1 "$CC " ${zi}iso3166.tab | cut -d$'\t' -f2 | sed 's|\&|&|g') EOT - done | \ + done < $tmpcc | \ yad --title="$(_ 'SliTaz TZ')" --window-icon="$icon" \ --width='500' --height='380' --on-top --center \ --image="$icon" --image-on-top \ @@ -575,7 +575,6 @@ fi icon='preferences-desktop-locale' - cat $PKGS_LIST | \ { yad --title="$(_n 'Manage locale packages')" --window-icon="$icon" \ --width='600' --height='400' --on-top --center \ @@ -589,7 +588,7 @@ --button="$(_n 'Install/Remove')!gtk-execute:2" \ --button="gtk-cancel:1" \ --print-all - } > $ANSWER + } < $PKGS_LIST > $ANSWER case "$?" in 1) rm_temp; exit 0;; diff -r 7cbf5f11d543 -r aa81af0a90f9 tinyutils/hwsetup --- a/tinyutils/hwsetup Mon Apr 15 10:15:58 2019 +0200 +++ b/tinyutils/hwsetup Sun Oct 20 12:35:57 2019 +0200 @@ -177,7 +177,7 @@ count=1 # assume device to be in last 3 entries; use tac - DEVICES_LIST=$(cat /proc/bus/usb/devices | grep ^[TDP] | \ + DEVICES_LIST=$(grep ^[TDP] /proc/bus/usb/devices | \ grep -B1 -A1 "$PATTERN" | grep -i vendor | awk ' { print $2,$3 } ' | \ sed 's/ / /'|sed 's/Vendor=//' | sed 's/ProdID=//' | tail -3) _ 'Detected USB Device : Vendor : Product'