Zip codes answers: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

19 March 2024

  • curprev 16:2416:24, 19 March 2024WikiSysop talk contribs 4,770 bytes +4,770 Created page with " Please note that in UNIX, there is more than one way to do things. '''Q1:''' <pre> zcat /home/projects/22126_NGS/exercises/unix/ZIP_CODES.csv.gz |awk 'BEGIN{FS=","}{if($5=="\"NY\""){print $0}}'|wc -l </pre> <ol> <li><code>zcat</code>: Decompresses the ZIP_CODES.csv.gz file and outputs its content.</li> <li><code>awk 'BEGIN{FS=","}</code>: Sets the field separator to a comma for the CSV file.</li> <li><code>if($5=="\"NY\""){print $0}</code>: Checks if the 5th field (st..."