zopencommunity / zopencommunity/bashport

A question about bash pipe(|)

Open
#72 2 comments 0 reactions 1 assignee View on GitHub

@IgorTodorovskiIBM is already working on this.

Since Jun 17, 2024.

Dominant language
Groovy
Stars
12
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I have an input file which is untagged and its content is ascii characters "abc".

$ echo abc >input
$ chtag -r input
$ chtag -p input
 - untagged    T=off input

And I have a Go program named main which reads data from stdin and prints the data in hex.
$ cat input | main
input is: 2fefbfbdc48e

I expected got "6162630a" which is "abc\n" in hex. It seems bash does a conversation from 819 to 1047. On my test system, _BPXK_AUTOCVT is set to "On". I am confused about the behavior. Any thought?
If the input file is tagged with 819 I got the expected output.
$ chtag -p input
6162630a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.