Re: print command
On Fri, Oct 31, 2003 at 09:28:33PM +0100, Alexander Schmehl wrote:
> * Vivek Kumar <email@example.com> [031031 20:50]:
> > Is there any other command to print any character say "*" 80 times..
> > Is there any short command ??
> for x in seq 1 80 ; do echo -n \* ; done
> Works in bash, don't know in other shells.
For portability, you should use 'printf \*' rather than 'echo -n \*'.
I was going to say something along the lines of this:
yes \* | head -n 80 | xargs printf %s
... but looking down the thread I see others have beaten me to it. Damn.
Colin Watson [firstname.lastname@example.org]