Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tr-test.sh fails on Ubuntu 24.04 #738

Open
BolunThompson opened this issue Dec 22, 2024 · 3 comments
Open

tr-test.sh fails on Ubuntu 24.04 #738

BolunThompson opened this issue Dec 22, 2024 · 3 comments
Assignees

Comments

@BolunThompson
Copy link
Contributor

BolunThompson commented Dec 22, 2024

Minimal reproduction:

#!/bin/bash

FILE=$(mktemp)
printf %s 1 > $FILE

cat $FILE
cat $FILE | tr 1 2
cat $FILE
echo # formatting

Bash output: 121
Pash output: 112

Related to #736.

Separately, @angelhof thoughts on adding Ubuntu 24.04 (or ubuntu-latest) to CI? There have been a few bugs (#726, #736) that only affect the newer version, and 20.04 is being depreciated in May.

@BolunThompson
Copy link
Contributor Author

BolunThompson commented Dec 22, 2024

I’ll assign this to myself unless someone else wants to look at this.

@BolunThompson BolunThompson self-assigned this Dec 22, 2024
@BolunThompson
Copy link
Contributor Author

BolunThompson commented Dec 22, 2024

Bizarrely, the script works as intended when invoked as a command substitution. Example:

./pa.sh test.sh # prints 112
(./pa.sh tr-test.sh) # prints 112
echo $(./pa.sh test.sh) # prints 121

Tested with both dash and bash. Does pash do something differently in the last case?

@angelhof
Copy link
Member

Bizarrely, the script works as intended when invoked as a command substitution. Example:

./pa.sh test.sh # prints 112
(./pa.sh tr-test.sh) # prints 112
echo $(./pa.sh test.sh) # prints 121

Tested with both dash and bash. Does pash do something differently in the last case?

This is really weird, I don't think anything changes when that happens. Does anything look different when using -d 1? What do outputs look like?

Separately, @angelhof thoughts on adding Ubuntu 24.04 (or ubuntu-latest) to CI? There have been a few bugs (#726, #736) that only affect the newer version, and 20.04 is being depreciated in May.

I think that is a great idea! Could you make a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants