Created
March 5, 2016 14:27
-
-
Save quickgrid/9208dc6ee0e83c18ba74 to your computer and use it in GitHub Desktop.
shell script for generates numbers using for loop and writes to file
This file contains hidden or 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 | |
# Generate numbers and save / append in the specified file. | |
generateNumbers(){ | |
for (( c=1; c<=$1; c++ )) | |
do | |
echo $c >> numbers.txt | |
done | |
} | |
generateNumbers $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment