Skip to content

Instantly share code, notes, and snippets.

@humberto-ortiz
Created January 24, 2017 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save humberto-ortiz/19821c2d746af5663510d4a50f432108 to your computer and use it in GitHub Desktop.
Save humberto-ortiz/19821c2d746af5663510d4a50f432108 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Random Student Generator
# Copyright 2017 - Humberto Ortiz-Zuazaga - humberto.ortiz@upr.edu
# Released under the GNU General Public License version 3 or later
# Read in a csv file named as an arugment
# (moodle grade report exorted as comma delimited plain text)
# skip one header line
# pick a random line
# extract field one and two (first and last name)
tail -n +2 "$1" | shuf -n 1 | cut -d, -f1,2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment