summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2010-05-05 10:08:18 +0200
committerDan Horák <dan@danny.cz>2010-05-05 10:08:18 +0200
commitabbff789ae244412df43f14c5542eca8b6a8fc8d (patch)
treee88cb0ee2ee15ec694a27a9a535e4e1696cbcbb6
parent5f31c74b8a9c168a15db3704a387364c39429abc (diff)
downloadutils-abbff789ae244412df43f14c5542eca8b6a8fc8d.tar.gz
utils-abbff789ae244412df43f14c5542eca8b6a8fc8d.tar.xz
utils-abbff789ae244412df43f14c5542eca8b6a8fc8d.zip
switch from tr to sed
use sed for lowercase (and comma to space) substitutions because it lives in /bin while tr lives in /usr/bin and thus requires /usr to be mounted
-rw-r--r--dasdconf.sh2
-rw-r--r--device_cio_free4
-rw-r--r--zfcpconf.sh2
3 files changed, 4 insertions, 4 deletions
diff --git a/dasdconf.sh b/dasdconf.sh
index bfb6af3..2be5276 100644
--- a/dasdconf.sh
+++ b/dasdconf.sh
@@ -27,7 +27,7 @@ if [ -f "$CONFIG" ]; then
#warn "No dasd-eckd or dasd-eckd loaded"
exit 0
fi
- tr "A-Z" "a-z" < $CONFIG | while read line; do
+ sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do
case $line in
\#*) ;;
*)
diff --git a/device_cio_free b/device_cio_free
index 381c0a0..80e9451 100644
--- a/device_cio_free
+++ b/device_cio_free
@@ -49,7 +49,7 @@ free_device()
[ -z "$1" ] && return
- DEV_LIST=$(echo "$1" | tr "A-Z" "a-z" | sed 's/,/ /g')
+ DEV_LIST=$(echo "$1" | sed 'y/ABCDEF/abcdef/' | sed 's/,/ /g')
for DEV in $DEV_LIST; do
[ $VERBOSE ] && echo "Freeing device(s) $DEV"
@@ -245,7 +245,7 @@ if [ $MODE_DASD ]; then
sed -e 's/.*[[:space:]]dasd=\([^[:space:]]*\).*/\1/' -e 's/([^)]*)//g' \
-e 's/nopav\|nofcx\|autodetect\|probeonly//g' -e 's/,,/,/g' -e 's/^,//' -e 's/,$//')
- for DEVRANGE in $(echo $DEVICES | tr ',' ' '); do
+ for DEVRANGE in $(echo $DEVICES | sed 's/,/ /g'); do
free_device $DEVRANGE
done
fi
diff --git a/zfcpconf.sh b/zfcpconf.sh
index 4e7dc78..ff8506f 100644
--- a/zfcpconf.sh
+++ b/zfcpconf.sh
@@ -28,7 +28,7 @@ if [ -f "$CONFIG" ]; then
if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
return
fi
- tr "A-Z" "a-z" < $CONFIG| while read line; do
+ sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do
case $line in
\#*) ;;
*)