#!/bin/bash # doc print_meta_flac { # # DESCRIPTION # print_meta_flac - Prints metadata of remote flac in FIELD=VALUE; format. # # USAGE # print_meta_flac # # } print_meta_flac() { local FILE="${1}" if [[ -f ${FILE} ]]; then awk 'BEGIN{FS=": ";ORS=";"}{if($1 ~ /comment\[/){print $2}}' <<< $(metaflac --list --block-type=VORBIS_COMMENT "${FILE}") | sed 's|.$||' fi }