#!/bin/sh
read vstup
if [ -f "$vstup" ]
then
cat $vstup
else if [ $vstup = "-"]
then
while [ $stadvstup != "q"]
do
read $stadvstup >> temp.txt
done
cat temp.txt
rm temp.txt
fi
fi
I would like to make script, which allows user to input name of the file or standard input. If user type name of the file, it will output content of the file, if user type "-", it will allow user to make an input and then it will output. I have used following code, please would someone give me a hint, what is wrong?