I first download a file to /root/TRY1/
:
#!/usr/bin/expect
cd /root/TRY1/
exec wget --http-user $user --http-password $password $url
Then I want to extract the file:
cd /root/TRY1/
exec bash -c "tar -xzvf /root/TRY1/BigDataProtector*.tgz"
However, this just downloads the file in that location and stops after that. The file isn't extracted.
But when I comment the wget part and run the extract command it does get extracted.
How do I make both the commands consecutively?