Please enable JavaScript to view this site.

Purpose:Copy standard input to standard output, and then copy the specified file(s) to standard output

 

Format:Y [/= /D /T /F"format" /Unicode=[UTF-16LE | UTF-8 | ASCII[,UTF-16LE | UTF-8 | ASCII]]] file ...

 

fileThe file or list of files to send to standard output.

 

/=Display the Y command dialog
/DPrefix each line with the current date (yyyy-mm-dd)
/ERegular expression to match
/TPrefix each line with the current time (hh:mm:ss.ms)
/UnicodeInput encoding

 

/F"format"A custom time/date format string. See @DATEFMT for details on the format arguments.

 

See also: TEE, piping and redirection.

 

Usage:

 

The Y command copies input from standard input (usually the keyboard) to standard output (usually the screen). Once the input ends, the named files are appended to standard output.

 

If you are typing at the keyboard to produce input text for Y, you must enter a Ctrl-Z to terminate the input.

 

When using Y with a pipe you must take into account that the programs on the two ends of the pipe run simultaneously, not sequentially.

 

See Piping for more information on pipes.

 

Examples:

 

To get text from standard input, append the files MEMO1 and MEMO2 to it, and send the output to MEMOS:

 

y memo1 memo2 > memos

 

The Y command is most useful if you want to add redirected data to the beginning of a file instead of appending it to the end. For example, this command copies the output of DIR, followed by the contents of  the file DIREND, to the file DIRALL:

 

dir | y dirend > dirall

 

Options:

 

/=Display the XSORT command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.

 

/E"regex"Only display lines that match the regular expression.

 

/Unicode=Specify the input and output encoding [UTF-16LE | UTF-8 | ASCII]. If you don't specify an input encoding type, input will default to the current TCC output encoding. If you don't specify an output encoding type, output will default to the current TCC output encoding.