[PR #1] [CLOSED] Use $(..) instead of legacy .. #1

Closed
opened 2026-03-02 15:45:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pardus-Ahtapot/SOLARIS/pull/1
Author: @mrkara
Created: 12/31/2016
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • dc71181 Use $(..) instead of legacy ..

📊 Changes

2 files changed (+16 additions, -16 deletions)

View changed files

📝 ahtapot-portscan/var/opt/portscan/parser.sh (+9 -9)
📝 ahtapot-portscan/var/opt/portscan/scanner.sh (+7 -7)

📄 Description

Backtick command substitution .. is legacy syntax
with several issues:
* It has a series of undefined behaviors
related to quoting in POSIX.
* It imposes a custom escaping mode with
surprising results.
* It's exceptionally hard to nest.

$(..) command substitution has none of these problems,
and is therefore strongly encouraged.

See also: https://github.com/koalaman/shellcheck/wiki/SC2006


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pardus-Ahtapot/SOLARIS/pull/1 **Author:** [@mrkara](https://github.com/mrkara) **Created:** 12/31/2016 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`dc71181`](https://github.com/Pardus-Ahtapot/SOLARIS/commit/dc711813b6abf4ea87a56db694ca231d1fa5e09e) Use $(..) instead of legacy `..` ### 📊 Changes **2 files changed** (+16 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `ahtapot-portscan/var/opt/portscan/parser.sh` (+9 -9) 📝 `ahtapot-portscan/var/opt/portscan/scanner.sh` (+7 -7) </details> ### 📄 Description Backtick command substitution `..` is legacy syntax with several issues: * It has a series of undefined behaviors related to quoting in POSIX. * It imposes a custom escaping mode with surprising results. * It's exceptionally hard to nest. $(..) command substitution has none of these problems, and is therefore strongly encouraged. See also: https://github.com/koalaman/shellcheck/wiki/SC2006 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 15:45:21 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SOLARIS#1
No description provided.