RosettaCodeData/Task/Repeat-a-string/AWK/repeat-a-string.awk

11 lines
139 B
Awk
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
function repeat( str, n, rep, i )
{
for( ; i<n; i++ )
rep = rep str
return rep
}
BEGIN {
print repeat( "ha", 5 )
}