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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:17:34+00:00 2026-06-17T23:17:34+00:00

Can you explain the mechanism behind the following line in a script? exec >

  • 0

Can you explain the mechanism behind the following line in a script?

exec > >(tee logfile.txt)

this basically outputs both STDOUT to the console and also logfile.txt when it’s in a script. I know what it does, but I cannot explain exactly why it works the way it does. I understand >(command args) is a process substitution. My main confusion comes from why having extra “>”?
why not exec >(tee logfile.txt)?

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

    See the help for exec ($ help exec). The relevant part is

    If COMMAND is not specified,
    any redirections take effect in the current shell.

    Since each command inherits its standard output from the shell that spawns it,
    every command now has the given process substitution as its standard output, rather
    than the terminal.

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

Sidebar

Related Questions

Can you please explain me the difference between mechanism of the following: int function();
Can anyone explain what is the math/physics behind this popular PSP game Locoroco. My
Can some one explain (or quote a reference) to compare the scoring mechanism used
anyone can explain me, why this parts of code are acting differently? while((c =
Anyone can explain in details what the following macro does? #define write_XDATA(address,value) (((char *)0x010000)
I hope I can explain this problem right, it's a bit confusing for me.
I hope this I can explain what I am trying to achieve: I want
I hope I can explain this well enough so that you can understand the
I hope I can explain this properly. I'm using flashDevelop for an avatar creation
I hope I can explain this right I have two input fields that require

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.