SEGMENTS=$(cat kiri.txt) #echo $SEGMENTS for SEGMENT in $SEGMENTS; do echo "now downloading >>> $SEGMENT" mkdir kiri # this makes a new folder # here we can download all the segments to curl $SEGMENT --output-dir kiri -O # this downloads all the segment files to a folder called stream done