This documentation reflects EDirect version 7.60, released on 11/14/2017.

We strive to keep this documentation up-to-date with the latest release. If you are looking for documentation on a more recent version of EDirect, or to find out more about new EDirect releases, please see the Release Notes of NCBI's EDirect documentation.

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.


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