- Copy the names and surnames from the spreadsheet and paste into a text editor. Save as for example names.
- Convert to lowercase. Names will be in two columns: firstname and surname:
dd if=names of=lowercase conv=lcase
- Create a file for each column, then get just the surname initial (I don't care about the inefficiency of creating all these files instead of cooking up a fancy one-liner)
cut -f1 lowercase > first
cut -f2 lowercase > last
cut -c1 last > lastinitial - Join it back up and remove the delimiter:
paste -d : first lastinitial > fplus1
cat fplus1 | tr -d : > usernames
Monday, 23 November 2015
Joining fields and removing delimiter
This is how to create usernames from the attendance list. It is highly unlikely to be the most efficient way, but its quick and I understand it.
Subscribe to:
Posts (Atom)