ref: 44efe644d6962daaf2f299560633221fd43abcc3
dir: /ztag/
#!/bin/rc file=$1 if(! ~ $#% 0) file=$% if(! ~ $#* 0) file=$1 nl=' ' if(~ $file '') exit 'no file given' tags=`{cat $file | sed 's/[ ]+/\n/g' | sort | grep '^#\[' | sed 's/^#\[//' | sed 's/$/, /g' | tr -d $nl | sed 's/, $//g'} echo $tags