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

  • SEARCH
  • Home
  • 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 8071533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:43:06+00:00 2026-06-05T13:43:06+00:00

I have continuously running script that waits for input and prints ‘Wait for input’

  • 0

I have continuously running script that waits for input and prints ‘Wait for input’ every 15 seconds to stdout. I need to emulate action of pasting list of IP addresses in stdin while script is running. For example manually i need to do these steps: copy list below including new line after last list element and paste it directly into stdin.

127.0.0.1
127.0.0.2
127.0.0.3

I’ve tried using pipes and redirections (with both \n and \r) from file with no luck

echo "127.0.0.1\n127.0.0.2\n" | script

or

script < file

where file contain same ip addresses. Any suggestions?

  • 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-05T13:43:08+00:00Added an answer on June 5, 2026 at 1:43 pm

    Use a FIFO!

    mkfifo /path/to/tmp.fifo
    tail -f /path/to/tmp.fifo | script
    

    Now whenever you send something to the fifo (from another TTY, from a process, whatever), it will be as if you typed into the waiting script, e.g.

    echo "127.0.0.1" >> /path/to/tmp.fifo
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple .exe that needs to be running continuously. Unfortunately, sometimes it
I have written up a python script that allows a user to input a
I need to have 2 (or maybe 3) continuously running facets of a program
I have rails application running in linode server .Some guy is continuously spamming (writing
I have to debug some error that is db related and have been continuously
Here is my script... all I want to do is have it continuously loop!
We have an external service that continuously sends us data. For the sake of
I wrote a short script that never terminates. This script continuously generates output that
I can't seem to figure this one out. I have a validator-type script that
I have a script, called test.py , that does the following: while (1): ....print

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.