> (greater-than)
As new Insider's Guide classes are no longer being offered, this site is not currently being updated. Please refer to NCBI's E-utilities documentation for more up-to-date information.
The Unix redirection operator “>” can be used to redirect the output of a command to a file. Simply add “>” at the end of the command, followed by the name of the file to which you wish to redirect the output. The file will be saved in your Unix working directory.
Examples
Redirect the output of an efetch
command to a file named “abstract.txt”:
efetch -db pubmed -id 26287646 -format abstract > abstract.txt
Redirect the output of an esearch
command to a file named “search_results.xml”:
esearch -db pubmed -query "h1n1 asthma" > search_results.xml