more sanity check before making output.

bark when sed fails.

Submitted by:	wosch@apfel.de
This commit is contained in:
Jun-ichiro itojun Hagino 1997-08-29 00:44:34 +00:00
parent ef6ab9c7ee
commit de51002fc7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28879

View file

@ -41,8 +41,8 @@ fi
for i
do
if [ ! -e $i ]; then
echo "$i does not exist" 1>&2
if [ ! \( -d $i -o -r $i \) ]; then
echo "$i inaccessible or not exist" 1>&2
exit 66 # EX_NOINPUT
fi
done
@ -72,7 +72,7 @@ do
else
echo "echo x - $i"
echo "sed 's/^X//' >$i << 'END-of-$i'"
sed 's/^/X/' $i
sed 's/^/X/' $i || exit
echo "END-of-$i"
fi
done