Created
January 19, 2012 07:35
-
-
Save rctay/1638601 to your computer and use it in GitHub Desktop.
[awk] print comma-separated NUS emails
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
#!/bin/awk | |
# a1234567b@nus is not a valid address, but a1234567@nus is. Hence this | |
# script. | |
# Expects: lines of nus matric no, like a1234567[...] | |
# Outputs: comma-separated nus email addresses on a single line, like | |
# [email protected],[...] | |
{ printf "%[email protected],", substr($0,0,8) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment