Skip to content

Instantly share code, notes, and snippets.

@iamricard
Last active December 17, 2015 01:59
Show Gist options
  • Save iamricard/5532737 to your computer and use it in GitHub Desktop.
Save iamricard/5532737 to your computer and use it in GitHub Desktop.
#!/bin/bash
## author : Ricard Sole Casas
## description : Script that captures input by nfc-list and does what you tell it to do
## twitter : @codinglion
## github : http://github.com/codinglion
## gist : http://gist.github.com/codinglion
while true; do
input=`nfc-list | grep UID | cut -d ":" -f 2 | sed 's/ //g'`
if [ -n "$input" ]; then
## insert here case or if
echo "$input"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment