#!/bin/bash while [ 1 ] do clear echo -n "Scan Barcode:" read s x="$(grep "$s," scan.lst|tail -n 1|cut -d\, -f2)" eval $x done