I know that if I do print (\"f\" + 2 * \"o\") in python the output will be foo.
print (\"f\" + 2 * \"o\")
foo
But how do I do the same thing in a bash script?
You could simply use loop
$ for i in {1..4}; do echo -n 'm'; done mmmm