I have some issues using wget with oceancolor server.
So here's a quick and dirty way to do the same with shell and curl.
--------------------------------------------------------------------------
url='
https://oceancolor.gsfc.nasa.gov/cgi/browse.pl'
curl -o "curl.dat" -s -L -O \
$url'?sub=level1or2list&sen=v0&per=DAY&day=15400&n=-49&s=-51&w=70&e=73' \
| perl -n -0777 \
-e 'if(/filenamelist&id=(\d+\.\d+)/){' \
-e 'print `wget "'$url'?sub=filenamelist&id=$1&prm=CHL" -qO -`;' \
-e '}' \
-e 'elsif(/(V\d+\.L2_NPP_OC)/){' \
-e 'print "$1\n";' \
-e '}' \
cat curl.dat | grep colspan | grep file | sed -e s/"&"/" "/g >tmp.dat
rm list.dat
# Loop on lines
while l= read -r line ;do
# Loop on words
for w in $line;do
# Search "file" keyword
echo `echo $w | sed -e s/'\='/' '/` | read args
if [ `echo $args | awk '{print $1}'` == "file" ];then
echo `echo $args | awk '{print $2}'` >> list.dat
fi
done
done <"tmp.dat"
rm curl.dat
rm tmp.dat
cat list.dat
-------------------------------------------
Output :
V2012061190600.L2_SNPP_OC_CHLOR_A_BRS
V2012061105400.L2_SNPP_OC_CHLOR_A_BRS
V2012061190600.L2_SNPP_OC_CHLOR_A_BRS
V2012061110000.L2_SNPP_OC_CHLOR_A_BRS
V2012061105400.L2_SNPP_OC_CHLOR_A_BRS
V2012061091800.L2_SNPP_OC_CHLOR_A_BRS
V2012061110000.L2_SNPP_OC_CHLOR_A_BRS
V2012061091800.L2_SNPP_OC_CHLOR_A_BRS
Best,