This a little test I'm doing that doesn't seem to work, but I can't see anything wrong with it. Is this a bug?
# Create an input file
cat << \EOF > -infile
aaa
bbb
aaa
EOF
#Create an input command file
cat << \EOF > cmdfile
1,$s/aaa/bbb/
w
q
EOF
#This command fails.
ed -s -- -infile < cmdfile
#The command returns a ?
echo $?
#returns 4. Don't have a clue what this means.
Thanks in advance,
Mike