I ran into notes for a server I used to work on back in the day but the redirection does not look right. Maybe someone can confim?
These were entries in my crontab entered by a third-party vendor who maintained the app/database that ran in this HP-UX server.
15 21 * * 0-6 /usr/sys/bin/stop q >/stopout 2<&1 #
30 21 * * 0-6 /usr/sys/force q >/out 2<&1 #
55 23 * * 0-6 /usr/sys/start q >/startout 2<&1 #
I found this in the Bash manual but this means that stderr and stdout is going out to >/{stopout,out,startout} while stderr is copying stdout (which means stdout is twice being written to stopout,out,startout?)? I'm confused :)
3.6.8 Duplicating File Descriptors
The redirection operator
[n]<&word
is used to duplicate input file descriptors. If word expands to one or more
digits, the file descriptor denoted by n is made to be a copy of that file
descriptor. If the digits in word do not specify a file descriptor open for
input, a redirection error occurs. If word evaluates to ‘-’, file descriptor n
is closed. If n is not specified, the standard input (file descriptor 0) is
used.