add description field to the pod.
[sgn.git] / bin / sequence_metadata / get_unique_attributes.sh
blob80520a88d684db540896ea0f229153d976c467a8
1 #! /usr/bin/env bash
3 # This script will return a line-separated list of unique attribute keys in the last column
4 # of the provided gff3 file
6 # Usage ./get_unique_attributes.sh <infile>
8 if [ "$#" -ne 1 ]; then
9 echo "Usage: $0 <infile>"
10 exit 1
13 attributes=$(awk -F $'\t' '{print $9}' "$1")
14 keys=$(echo "$attributes" | grep -o "\([^=;]\+\)=" | cut -d '=' -f 1)
15 echo "$keys" | sort | uniq