The only real working part of the function is the for loop. Emulating a Traditional Numeric For Loop Bash scripts often deal with lists of files or lines of output from other commands, so the for in type of loop is common. Video 01: 15 Bash For Loop Examples for Linux / Unix / OS X Shell Scripting Conclusion. Bash For Loop Example However, the reverse is not true; you cannot arbitrarily replace newlines with semicolons. This is how my sample small code look: The bash $(