0

I would like to run a script that can be access in other terminals other then my own. like bash <(curl -s http://domain.com/scripts/hello.sh) but I need this script to grep a txt file that is also located on that server for example domain.com/scripts/stuff.txt. What would be the best method?

Chris Ivie
  • 21
  • 4

3 Answers3

0

Try:

curl -s http://domain.com/scripts/stuff.txt | grep "$Hi"

You can redirect the output to a local text file, like so:

curl -s http://domain.com/scripts/stuff.txt | grep "$Hi" > stuff_that_starts_with_hi.txt
PlasmaPower
  • 1,864
  • 15
  • 18
0

Download a text file, and pipe it into grep:

curl http://domain.com/scripts/stuff.txt | grep foo

Tyler Henthorn
  • 581
  • 5
  • 12
0

You can also use wget

wget -qO - http://domain.com/scripts/stuff.txt | grep dat
Jotne
  • 40,548
  • 12
  • 51
  • 55