thanks for the help,
all three solutions are working very well.
only on this line there is a little correction:
echo $a $b $c $0b"_"$c"_"$a >> output-file-name
PS: It is not a homework, i dont even have to do this in shell. but i would like to learn a bit how shell scripting works