How can I print a '-' on the same line within awk, say 50 times, without actually typing '-' 50 times?
Cheers
How can I print a '-' on the same line within awk, say 50 times, without actually typing '-' 50 times?
Cheers
I'd use perl,
perl -e 'print("-" x 50, "\n" );'
Cheers
ZB
Within awk, using a "for" loop...
awk 'BEGIN{for(c=0;c<50;c++) printf "-"; printf "\n"}'
...or the less common "do while" loop...
awk 'BEGIN{c=0; do{printf "-"; c++}while(c<50); printf "\n"}'
Cheers guys
Thanks for yoru help