aboutsummaryrefslogtreecommitdiff
path: root/extract_field.sh
blob: aab4b6ab3b8dedcfa3471f161f4d4bb434a45fbb (plain)
1
2
3
4
5
#!/bin/bash

# Usage: ./extract_field.sh DBNAME KEY FIELDIDX

awk 'BEGIN { FS = ":" } $1 == "'"$2"'" { print $'"$3"'}' < $1