Changes

Jump to: navigation, search

Tutorial12: Shell Scripting - Part 2

1 byte added, 08:19, 27 July 2020
Additional Loop Statements
Let’s issue the for loop with a list using command substitution. In the example below, we will use command substitution to issue the ls command and have that output (filenames) become arguments for the for loop.
Example:
<span style="font-family:courier">for x in $(ls)<br>do<br> &nbsp;&nbsp;&nbsp;echo “The item is: $x”<br>done</span><br><br>
13,420
edits

Navigation menu