In bash I'm trying to collect my grep results in array, each cell holding each line. I'm downloaing urls with this line
wget -O index -E $CurrentURL
and then i want to grep the 'index' file results (other urls) into array each line per cell, what should be the correct syntax?
Array=(
grep "some expression" index
)
??
readarray GREPPED < <(grep "some expression" index)
for item in "${GREPPED[@]}"
do
# echo
echo "${item}"
done
Oh, and combine those -v
greps like so:
egrep -v '\.(jpg|gif|xml|zip|asp|php|pdf|rar|cgi|html?)'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With