Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # bash for loop example
- LIST=(
- some
- thing
- )
- for item in ${LIST[@]};do echo $item;done
- for item in ${LIST[@]};do sudo grep -R $item . >> ../RELIST;done
- # bash for iterate download urls
- for item in ${LIST[@]};do mkdir ./item/${item:0:5} && wget -O ./item/${item:0:5}/${item}\.html http://example.com/product/${item:0:5}\.uts;done
- # grep -oh keep only the found characters
- for item in ${LIST[@]};do grep $item ../RELIST | grep -oh ",[0-9]*\.[0-9][0-9],";done
- for item in ${LIST[@]};do temp=$(grep $item ../RELIST);echo $(echo $temp | grep -oh ",[0-9]*\.[0-9][0-9],") $item >> OUTPUT;done
Advertisement
Add Comment
Please, Sign In to add comment