Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeat display of characters 1

Status
Not open for further replies.

MHThomas

Technical User
Nov 25, 2002
26
GB
Hi,
I'm sure this must be simple, but I'm new to shell scripting. Is it possible to use a function to display a number of characters? Basically, I am trying to write a quick pictogram style graph to screen and want to print 10 #'s if 'a = 10'.
I know it would be easy to write a routine for this, but I'm sure there must already be a function.

Cheers,

Mark T.
 
nawk -v repeat=${a} 'BEGIN{$repeat=OFS="#";print}' vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Cheers Vlad.
Exactly what I needed.

Cheers,

Mark T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top