Skip to content

Conversation

@JeromeDeBretagne
Copy link
Contributor

@JeromeDeBretagne JeromeDeBretagne commented Feb 5, 2026

Remove calls to some external utilities (awk, basename, sed) in the erl and start_erl scripts, replacing them with POSIX shell parameter expansion and 'read' built-ins.

This improves compatibility with embedded systems and restricted environments where these tools may be missing, particularly on older releases of Android.

Notes on the shell built-ins used:

  • "${0##*/}": A POSIX parameter expansion that removes the longest prefix matching '*/'. This pattern matches everything up to and including the last slash, effectively performing a 'basename' operation entirely within the shell. This also covers the case when there is no slash character at all.

  • read -r VAR1 VAR2 < File: Read the first line of a file and assigns the first two space-separated words to each variable, replacing the 2 external calls to 'awk'.

Let me know if you have any questions.

Thanks,
Jérôme

P.S. I was waiting for #10573 to be merged first, it was applied into master earlier today.

Remove calls to some external utilities (awk, basename, sed) in the
erl and start_erl scripts, replacing them with POSIX shell parameter
expansion and 'read' built-ins.

This improves compatibility with embedded systems and restricted
environments where these tools may be missing, particularly on older
releases of Android.

Notes on the shell built-ins used:

- "${0##*/}": A POSIX parameter expansion that removes the longest
  prefix matching '*/'. This pattern matches everything up to and
  including the last slash, effectively performing a 'basename'
  operation entirely within the shell.

- 'read -r VAR1 VAR2 < File': Read the first line of a file and
  assigns the first two space-separated words to each variable,
  replacing the 2 external calls to 'awk'.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

CT Test Results

    3 files    136 suites   49m 59s ⏱️
1 660 tests 1 604 ✅ 56 💤 0 ❌
2 299 runs  2 225 ✅ 74 💤 0 ❌

Results for commit 4007cdb.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Feb 9, 2026
@jhogberg jhogberg self-assigned this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants