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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:35:27+00:00 2026-06-11T20:35:27+00:00

I have a script that generates various outputs on the console, it runs various

  • 0

I have a script that generates various outputs on the console, it runs various commands and programs.

I’m looking for a way to put all console output into a log file. But he did not want the “. / MeuScrip >> log.txt”. Also use “. / Myscript | tee log.txt”. but this hide questions confirmation of programs (y|n).

I wanted to configure the log file in my script.
Does anyone have a solution for this?

thank you
Felipe

  • 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-11T20:35:28+00:00Added an answer on June 11, 2026 at 8:35 pm

    if the script prompts then unsure how you can capture something interactive beyond the question. Meaning it will only get far as (y/n) then halt waiting for human input, anyhow won’t get too involved give this a try
    ./MenuScrip 2>&1 > ./log.txt

    the only problem with that is all out put is going there and you may not get to see the prompt yourself.

    why not edit the script itself and put logging into the script so what ever the user chooses or script does it logs to a log file meaning at edit the script declare a log file at the top then what ever u wish to log capture command/input and send to log file as well as carry out

    all the best

    edited to add:

    if the script is a binary file and assuming this is for monitoring purposes i.e. to overlook what others have actioned you could::

    Make user sudo as another user

    Running the later versions of sudo comes with sudoreplay – this will let you play back their entire key by key input/actions you could then replay the sudo files when required

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

Sidebar

Related Questions

I have a script that generates two lines as output each time. I'm really
I have a python script that runs a program, which generates few .exe files
I have a script that generates DDL scripts to define materialized views for a
I have a script that generates images from text using PHP. It's working fine
For automated testing (using Hudson) I have a script that generates a bunch of
I have a php script that randomly generates an image. Something like this: <?php
I have a script that generates a log file with ANSI color codes in
I have a script that generates img tags, and i want to make sure
To index my website, I have a Ruby script that in turn generates a
I have a script that generates an SQL query as text e.g. ... return

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.