0

How to access url (http://www.localhost:8080) using shell script not in browser. I just want to run my app server and test

Ex. sh example_test.sh

I tried like this wget localhost:8080/myproj?ce=1234 but it saying Cannot write to `myproj?ce=1234' File name too long

2 Answers 2

2

You can try following

content=$(wget http://localhost:8080 -q -O -)
echo $content

Or

content=$(curl -L http://localhost:8080)
echo $content
Sign up to request clarification or add additional context in comments.

1 Comment

Hi .. Thanks alot.. I am newbie to shell script. wget works fine.
1

Two most popular command line tools:

  • curl
  • wget

1 Comment

Hi I tried like this wget localhost:8080/myproj?ce=1234 but it saying Cannot write to `myproj?ce=1234' File name too long

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.