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 7741483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:02:39+00:00 2026-06-01T09:02:39+00:00

Suppose I have a script: my_script.sh Instead of doing ./my_script.sh I want to do

  • 0

Suppose I have a script: my_script.sh

Instead of doing

./my_script.sh

I want to do something like:

cat my_script.sh | <some command here>

such that the script executes. Is this possible?

The use case is if the script I want to execute is the output of a wget or s3cat, etc. Right now I save it to a temporary file, change it to executable, and then run it. Is there a way to do it directly?

  • 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-01T09:02:41+00:00Added an answer on June 1, 2026 at 9:02 am

    Just pipe it to your favorite shell, for example:

    $ cat my_script.sh
    set -x
    echo hello
    $ cat my_script.sh | sh
    + echo hello
    hello
    

    (The set -x makes the shell print out each statement it is about to run before it runs it, handy for debugging, but it has nothing to do with your issue specifically – just there for demo purposes.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have something like this page: <noscript>You need JS for this page</noscript> <script>
Suppose I have a perl (or python) script that does something highly secretive; I'd
Suppose I have a git repos that contains original.script . At some point, I
Suppose I have a python script called my_parallel_script.py that involves using multiprocessing to parallelize
Suppose we have a BASH script running some commands in the background. At some
Suppose I have knockout.js template like this: <script type=text/html id=mytemplate> <label for=inputId>Label for input</label>
Suppose I have several 200mb+ files that I want to grep through. How would
I have this jquery script which suppose to hide/show div element base on the
I have a script that is supposed to sit there, happily running in a
I have a PHP script that's supposed to take in a URL and search

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.