That is a command (i.e., the thing you type at a command-line prompt).
Type: Posts; User: tabstop
That is a command (i.e., the thing you type at a command-line prompt).
I don't think we need to pipe prog4 to prog3, since prog3 reads from the file, right? I think your ./doit.sh file would just be
prog4
prog3 | prog2 | prog1