Created
November 24, 2015 18:52
-
-
Save shang-lin/2d0d20cb6e5d392288a9 to your computer and use it in GitHub Desktop.
Construct a comma-separated email list that can be copied and pasted into the to, cc, or bcc field.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# myfile.csv is a CSV export of a Google sheet. that contains name, email, and affiliation . | |
# The first three lines are headings and boilerplate. "-n +4" tells tail to only display line 4 and later. | |
# The cut command extracts the second column (email addresses) using ',' as the delimiter. | |
# tr transforms the newlines into commas to create a comma-separated list of only email addresses. | |
tail -n +4 myfile.csv | cut -d ',' -f 2 | tr '\n' ',' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment