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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:02:43+00:00 2026-06-15T00:02:43+00:00

Consider ./my_script >/var/log/my_log Single echo statement from this script alone must to go to

  • 0

Consider ./my_script >/var/log/my_log

Single echo statement from this script alone must to go to stdout.

How could this be accomplished ?

  • 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-15T00:02:44+00:00Added an answer on June 15, 2026 at 12:02 am

    so we have some clever program

    cat print2stdout 
    #!/bin/sh
    
    echo some words secret and sent to null
    
    echo some words to stdout > /dev/fd/3
    

    last line puts to echo to 3 file descriptor opened.

    and when invoking we map 3 FD to stdout, then redirect stdout to file

    the result looks like that:

    ./print2stdout 3>&1 >/dev/null  
    some words to stdout
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please consider the following code and the explanation from this Mozilla tutorial Using web
Consider the following example : <input type=text id=#ab>cd.ef value=foo /> <script type=text/javascript> var id
Consider this snippet: function f() { return 'hi'; } echo f(); Vs this snippet:
consider the following code: <script> function testFunc(){ alert('test') } $(function(){ var g = document.getElementById
consider my source file looks like this. <Content xmlns=uuid:4522eb85-0a47-45f9-8e2b-1x82c78xx920> <first>Hello World.This is Fisrt field</first>
From my previous question for selecting specific html text, I have gone through this
Consider following logic as requirement: var count=4; for(var i=0;i<count;i++) { /* create a table
Consider the following: me@mine:~$ cat a.sh #!/bin/bash echo Lines: $LINES echo Columns: $COLUMNS me@mine:~$
Here is my code in a jsp: <script> var myArray = []; </script> <c:forEach
Consider these two table: <table id=prototype style=display:none;> <tr> <td></td> <td><input type=text ></td> <td><?php echo

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.