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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:54:15+00:00 2026-05-27T07:54:15+00:00

I have a program which print to stdout. $ ./program > log.txt $ cat

  • 0

I have a program which print to stdout.

$ ./program > log.txt
$ cat log.txt
[A]
00: efbb bf52 454d 2047 454e 5245 204f 7065
10: 7261 0d0a 5245 4d20 4441 5445 2032 3031
20: 310d 0a52 454d 2044 4953 4349 4420 3235

[B]
00: 3132 4334 3134 0d0a 5245 4d20 434f 4d4d
10: 454e 5420 2245 7861 6374 4175 6469 6f43
20: 6f70 7920 7631 2e30 6231 220d 0a50 4552

[C]
00: 464f 524d 4552 2022 5661 7269 6f75 7322
10: 0d0a 5449 544c 4520 2220 5468 6520 4f70
20: 6572 6120 4344 2031 220d 0a46 494c 4520

I want to pipe program‘s output to xxd to generate more information.

$ echo -e 'g/^00/,/^20/!xxd -r | xxd\n%p' | ex file.log
[A]
0000000: efbb bf52 454d 2047 454e 5245 204f 7065  ...REM GENRE Ope
0000010: 7261 0d0a 5245 4d20 4441 5445 2032 3031  ra..REM DATE 201
0000020: 310d 0a52 454d 2044 4953 4349 4420 3235  1..REM DISCID 25

[B]
0000000: 3132 4334 3134 0d0a 5245 4d20 434f 4d4d  12C414..REM COMM
0000010: 454e 5420 2245 7861 6374 4175 6469 6f43  ENT "ExactAudioC
0000020: 6f70 7920 7631 2e30 6231 220d 0a50 4552  opy v1.0b1"..PER

[C]
0000000: 464f 524d 4552 2022 5661 7269 6f75 7322  FORMER "Various"
0000010: 0d0a 5449 544c 4520 2220 5468 6520 4f70  ..TITLE " The Op
0000020: 6572 6120 4344 2031 220d 0a46 494c 4520  era CD 1"..FILE

Here is the problem:

How to pipe the output of program directly to ex without saving it as a temp file?



note: prefer to using standard tools(such as, ed, ex, sed, awk, etc.)

  • 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-27T07:54:16+00:00Added an answer on May 27, 2026 at 7:54 am

    ex accepts “-” as the input file. This indicates ex to read from stdin.
    You can probably do something like:

    ./program | ex -c "your command1" -c "your command2" -

    If -c can not be used to your intent, then maybe you can use redirection to introduce them manually as ex man page says that when stdin is redirected it uses stderr as input for commands.

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

Sidebar

Related Questions

I have a program which prints (by printf) to the stdout some data and
let us have a situation in which the following program prints some 10 lines
I have a program which needs to behave slightly differently on Tiger than on
I have a program which deliberately performs a divide by zero (and stores the
I have a program which has some Textareas / Labels these can be anywhere
I have a program which needs installing on windows 64 boxes. Most of the
I have a program which only needs a NotifyIcon to work as intended. So
I have a program which I would like to run every X min the
I have a program which runs an external, command line utility and reads the
I have a program which doesn't once reference System.I0, coded in vb.net, yet for

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.