make shells behave on I/O redirection