Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8984259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:03:22+00:00 2026-06-15T21:03:22+00:00

I wrote a small bash script to check if a website is up or

  • 0

I wrote a small bash script to check if a website is up or not (using isup.me). It works currently (in terminal I call “sh isup.sh stackoverflow.com”). What I’d like to be able to do is call “sh isup.sh stackoverflow.com someother.site” (two arguments) and loop through the output for each argument.
Here is my code:

#!/bin/bash
theSite=$1
curl isup.me/$theSite | grep 'just' | sed s'/<a href="//' | sed s'/" class="domain">//' | sed s'/<\/a>//' | sed s"/http:\/\/$theSite//" | sed s'/<\/span>//'

Another (noncritical) question I have is: can I get rid of the “% Total % Received % Xferd Average Speed Time Time Time Current” bit of the curl function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:03:24+00:00Added an answer on June 15, 2026 at 9:03 pm

    curl accepts multiple URLs, so you just need to build up the list and execute a single command. You can do this pretty simply with a parameter expansion. As an aside, you don’t need to use all those pipes. You can modify the entire thing with a single gsed or awk command. Here’s how I would write it:

    #!/bin/bash
    
    curl -s "${@/#/http://isup.me/}" |
        awk -F '[<>]' '/just/{
            sub("http://", "", $3);
            print $3 $NF;
        }'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a small bash script to test suid permission $ cat phone.sh #!/bin/sh
I wrote a small test program for flipperview. I have 3 views. I call
I wrote a small internal web app using (a subset of) pylons . As
I wrote some small apps using .NET 3.5 but now I am stuck with
I wrote a small app that turns out to be using a lot of
I wrote a small shell script configuring attached external displays with xrandr. # cat
I've created a small Bash script that does a MySQL data dump. Because the
I wrote small script in python to translate words from English to Russian language.
i wrote a small FQL script that returns the latest wallposts of my fanpage.
I wrote a small bash function to provide completion for vim. The function is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.