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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:42:34+00:00 2026-05-15T05:42:34+00:00

Why does the following not work? exec 3<|cat $0 The idea is to get

  • 0

Why does the following not work?

exec 3<|cat $0

The idea is to get file-descriptor (3) of a pipe (| cat $0).

  • 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-05-15T05:42:35+00:00Added an answer on May 15, 2026 at 5:42 am

    You cannot mix exec and pipes that way. It seems what you need is a process substitution:

    $ exec 3< <(cat /etc/hosts)
    $ grep ftp <&3
    209.85.41.143 ftp.archlinux.org
    

    http://tldp.org/LDP/abs/html/x17601.html#REDIR1

    http://tldp.org/LDP/abs/html/process-sub.html

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

Sidebar

Related Questions

Thanks to this answer I was able to get javascript to execute when being
Concerning the following situation: www.foo.com is a page delivered in UTF-8. It features a
Concerning the following situation: www.foo.com is a page delivered in UTF-8. It features a
I'm getting the following exception in my log when I try to perform an
I can run an svn command from the command line but not from within
I've been looking up ways to run external programs using Java's runtime. This works
Suppose I use QTPs recovery scenario manager to set the playback synchronization timeout to
I've been using cucumber without trouble for with Rails 3 for a while, but
I have a directory with a bunch of person images in it. Unfortunately the
I have developed a JSP web application which, on every request, spawns a new

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.