diff options
| author | Franklin Wei <franklin@rockbox.org> | 2019-10-08 14:04:56 -0400 |
|---|---|---|
| committer | Franklin Wei <franklin@rockbox.org> | 2019-10-08 14:04:56 -0400 |
| commit | bf16fee7eb78b9385f6007c14e9e9c4c857dc174 (patch) | |
| tree | c79f6830f7cb700b511012ddbc2b9efc7e7f8ca4 /extract_field.sh | |
| parent | cfa7559866c05b0422b6965dd1e32080538e17bd (diff) | |
| download | blog-bf16fee7eb78b9385f6007c14e9e9c4c857dc174.zip blog-bf16fee7eb78b9385f6007c14e9e9c4c857dc174.tar.gz blog-bf16fee7eb78b9385f6007c14e9e9c4c857dc174.tar.bz2 blog-bf16fee7eb78b9385f6007c14e9e9c4c857dc174.tar.xz | |
Clean up.
Diffstat (limited to 'extract_field.sh')
| -rwxr-xr-x | extract_field.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extract_field.sh b/extract_field.sh new file mode 100755 index 0000000..aab4b6a --- /dev/null +++ b/extract_field.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Usage: ./extract_field.sh DBNAME KEY FIELDIDX + +awk 'BEGIN { FS = ":" } $1 == "'"$2"'" { print $'"$3"'}' < $1 |