13,420
edits
Changes
→Additional Loop Statements
===Additional Loop Statements===
[[Image:for-command-substitution.png|thumb|right|300px|Example of how a '''for loop with command substitution''' works.]]'''Command Substitution'''
command substitution is a facility that allows a command<br>to be run and its output to be pasted back on the command line as arguments to another command.<br>Reference: https://en.wikipedia.org/wiki/Command_substitution
Let’s issue the for loop with a list using command substitution.<br>In the example below, we will use command substitution to issue the ls command and<br>have that output (filenames) become arguments for the for loop.