Quickly listing phages in Genbank

Based on the command we use for searching for phages in Genbank for INPHARED database , I recently came across some useful further eutilities commands. Writing here for when I forget

To list the most recent genomes in the last 50 days for instance use the -days flag

esearch -db nucleotide -query "gbdiv_PHG"[prop] -days 50    | efilter -query "40000:800000 [SLEN]" -sort "Date" |  esummary | xtract -pattern  DocumentSummary -element AccessionVersion -element CreateDate -element UpdateDate -element Title
-element TaxId

then with esummary and the extract , utilities to extract specific information. In this case the Accession, creation date, update date , title and TaxID . To produce an easily parsable list in tab format.

OR420333.1      2023/10/01      2023/10/01      UNVERIFIED: Macromonas phage BK-30P, complete genome
OR473000.1      2023/10/01      2023/10/01      Synechococcus phage S-CREM2, complete genome
OR500351.1      2023/10/01      2023/10/01      Xanthomonas phage Murka, complete genome
OR257569.1      2023/10/01      2023/10/01      Ruegeria phage RpAliso, complete genome
OR338916.1      2023/10/01      2023/10/01      Bacillus phage DZ1, complete genome
OR339795.1      2023/10/01      2023/10/01      Escherichia phage phi456, complete genome
OR296290.1      2023/10/01      2023/10/01      Escherichia phage SDYTW1-F1-2-2_3, complete genome
OR157981.1      2023/10/01      2023/10/01      Staphylococcus phage BUCT_X001, complete genome
OQ326580.1      2023/10/01      2023/10/01      UNVERIFIED_ORG: Phage vB_PaeM_Sem1, complete genome
OR148986.1      2023/10/01      2023/10/01      Caudovirus D_HF5_2C, complete genome