You can enter a multiline command at the shell prompt. The shell will prompt with $PS2 until the command is complete:
`$ $ if [ -d /vol/USBDISKB ]`
]
> then
`> then `
`> > echo "Found USB drive" `
drive"
> else
`> else `
`> > echo "Not found: USB drive!"`
drive!"
> fi
`> fi`
`Not Not found: USB drive!`
drive!
The '!' in double quotes might cause a problem due to the ridiculous practice of using a printing character for something other than printing the character. I prevent it by setting $histchars to the emptry string in ~/.bashrc