How To: for loops in bash
erics, Posted February 27th, 2015 at 5:26:35pm
1 2 3 4 |
#!/bin/bash for line in `cat file.txt`; do echo line: $line done |
1 2 3 4 |
#!/bin/bash for file in $( ls ); do echo filename: $file done |
1 2 3 4 |
#!/bin/bash for i in `seq 1 10`; do echo $i done |
Leave Your Comment
All fields marked with "*" are required.