bash - checking if grep command returns correct output -
thing using wget
extract url after want pipe grep check if matches pattern , if echo name of url.
something this:
wget url |grep "pattern" if successful display urlname
an if
condition true if command returns 0. grep
returns 0 if matches pattern input.
if wget -o - ... | grep -q ... ... fi
Comments
Post a Comment