# tpu: tag pennsic univ # Take a Pennsic-University instructor's name and make a "pennsic/univ/full_name=title" tag line. # Brent Chivers Sun Aug 27 22:49:05 EDT 2017 # # This form works with the name on the command line: # echo -n "pennsic/univ/" # echo -n $* | /usr/bin/cut -d' ' -f2- | /usr/bin/tr ' ' _ | /usr/bin/tr -d '\012' # echo -n "=" # echo $* | /usr/bin/cut -d' ' -f1 # # This form works as a filter (i.e. reformatting a line within vi): echo -n "pennsic/univ/" cat $* | /bin/sed 's/\(^[^ ]*\) \(.*\)/\2=\1/' | /usr/bin/tr ' ' _