1
0
Files
irix-657m-src/eoe/cmd/systune/edstune
2022-09-29 17:59:04 +03:00

41 lines
479 B
Bash
Executable File

#!/bin/sh
# If parameter already in stune, see if we're allowed to change it.
# Otherwise, append the new value to the end.
ed_stune()
{
if [ "$sline" ]
then
ed - $STUNE >/dev/null 2>&1 <<-!
/^$name[ ]/c
$name = $new_value $LL
.
w
!
return $?
else
echo "$name\t= $new_value $LL" >>$STUNE
return $?
fi
}
STUNE=$1
name=$2
new_value=$3
LL=$4
if sline=`grep "^$name[ ]" $STUNE 2>/dev/null`
then
set - $sline
fi
if ed_stune
then
:
else
exit 1
fi