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

# Usage: ./extract_field.sh DBNAME KEY FIELDIDX

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