#!/bin/bash # convert curfloo commands to gyach cd ~/.yahoorc/gyach if [ ! -f ~/.curfloo/commands ] then exit fi cp -av ~/.curfloo/commands ./floocoms sed -e 's/::/:/g' floocoms |\ awk 'BEGIN { FS=":" ORS="" } { if (substr($1,1,1) == "#"){ print $0"\n" } else { regex="$[0-9]" if ((index($0,"$*")) || (match($0,regex))) { print $1": | " substr($0,index($0,$2))"\n" } else { print $1":"substr($0,index($0,$2))" | \n" } } }' > newcoms