Files
hpr_website/www/eps/hpr2610/hpr2610_awk12_extra.awk

15 lines
326 B
Awk
Executable File

#!/usr/bin/awk -f
#
# Awk script to take a sequence of words separated by spaces and turn them
# into a string where each word is followed by as many hyphens as there are
# letters in the word itself.
#
{
for (i=1; i<=NF; i++){
fill=$i
gsub(/./,"-",fill)
printf "%s%s",$i,fill
}
print ""
}