This documentation reflects EDirect version 9.00, released on 6/6/2018.
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 operator “$” can be used to access the value of a variable or command. This can be especially useful in conjunction with the
cat command to include the contents of a file in another Unix command.
If you have a search string saved in a text file (searchstring.txt), and would like to use that search string as the value for the
esearch -query argument without having to re-type it or copy and paste, you can use the value of
cat searchstring.txt (i.e. the contents of the file “searchstring.txt”) as the
-query argument for an
esearch -db pubmed -query "$(cat searchstring.txt)"