13,420
edits
Changes
→Additional Loop Statements
===Additional Loop Statements===
'''for Loop using Command Substitution'''
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.
for x in $(ls)
do
echo “The item is: $x”
done
===Using Startup Files===