Skip to content

Instantly share code, notes, and snippets.

@rococodogs
Created February 3, 2016 18:46
Show Gist options
  • Select an option

  • Save rococodogs/e4abd86aad43e7301e4f to your computer and use it in GitHub Desktop.

Select an option

Save rococodogs/e4abd86aad43e7301e4f to your computer and use it in GitHub Desktop.

Quick one-liners for course-reserves-related reports w/ WMS.

  • Count items on reserve:
awk 'BEGIN { FS="|"; COUNT = 0 } END { printf "There are %d items on reserve\n", COUNT } $4 ~ /Reserves/ { COUNT++ }' <filename>
  • Count personal items on reserve:
awk 'BEGIN { FS="|"; COUNT = 0 } END { printf "There are %d personal items on reserve\n", COUNT } $4 ~ /Reserves/ && $13 ~ /^615/ { COUNT++ }' <filename>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment