Created
December 13, 2019 01:53
-
-
Save tiagotele/f2ff11335891bc697131ec173cd2e50a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################################## | |
# Sample to assign output from command(ls) to a variable(files) and iterate over every file | |
# and print its name. | |
############################################################################################## | |
files=$(ls) | |
echo "Printing files" | |
for file in $files; do | |
echo "$file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment