PowerTip: Use PowerShell to Multiply Strings

Doctor Scripto

Dr Scripto

Summary: Use Windows PowerShell to multiply strings.

Hey, Scripting Guy! Question How can I use Windows PowerShell to display a string a number of times, without doing a lot of typing?

Hey, Scripting Guy! Answer Multiply the string:

PS C:\> “cat ” *5

cat cat cat cat cat

Doctor Scripto
Dr Scripto

Scripter, PowerShell, vbScript, BAT, CMD

Follow Dr Scripto   

0 comments

    Leave a comment