View Single Post
Posts: 18 | Thanked: 29 times | Joined on Dec 2013
#519
Originally Posted by jamar View Post
Hmm, it's just a simple sed line, it should work and it's working correctly on my server.
Are the previous curl lines working for you, so you have the orders history page content in $orders variable, if you try to echo it?
This works in the terminal
Code:
$ order_status=`echo '<td><em>Paid</em></td>'| sed -e 's/.*<td><em>//g' -e 's/<\/em>.*$//g'`
$ echo $order_status 
Paid
But it does not work within the script
Code:
echo "Filtering status..."
order_status=`echo $orders | sed -e 's/.*<td><em>//g' -e 's/<\/em>.*$//g'`
echo "order_status=$order_status"
Code:
Filtering status...
order_status=
Status of your order is still , nothing to do but wait.