wget и grep данные в переменную

Post new topic   Reply to topic    DD-WRT Forum Index -> Использование и установка DD-WRT
Author Message
jtleo
DD-WRT Novice


Joined: 14 Jun 2019
Posts: 7

PostPosted: Sun May 31, 2020 9:44    Post subject: wget и grep данные в переменную Reply with quote
помогите найти в чем ошибка:

задача: в dd-wrt записать в переменную sid=и т.д.

Code:
root@device:~# Var1=`wget -S 192.168.1.2 | grep -o "sid=.*"`
Var1=`wget -S 192.168.1.2 | grep -o "sid=
.*"`
Connecting to 192.168.1.2 (192.168.1.2)
  HTTP/1.1 302 Found
  Location: https://192.168.1.2/?sid=6%2Fe%2BDfjiNj5YLHONmVBO9QYYiU8jjwEq8dzLlVVH9W6RlWwAC8dIzKn%2Bg61LeZlL9%2BpakIqQjXobOCekqIZD%2FWfH0nb0pXF29G0Vi8AM386Lid4HixctQiiKByj%2B21b1mKbFr8t9VX96GAmpsg%3D%3D
root@device:~# echo $Var1
echo $Var1

root@device:~#


что не так? делаю то же самое в консоле на компьютере - работает
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Использование и установка DD-WRT All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum