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

airmon-ng.linux: fix shellcheck error SC2045 at lines 261-264, #2559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wileyhy
Copy link
Contributor

@wileyhy wileyhy commented Jul 30, 2023

line 261, Remove explanatory comment.
line 262, Remove "shellcheck disable" comment.
line 263 > 261, Change an unquoted command substitution containing an ls command into a glob expression on the same directory path.
line 264 > 261, Move the "type" directory name up one line.
line 262, Add a test [ for the existence of such a directory ( "$j" ).
line 264 > 262, Change the argument to the cat command.
lines 263 & 264, Add two parameter expansions of "$j".
Keep the total line count and the later variables "$k" and "$i" on lines 266 and 267, respectively, the same as they were.

line 261, Remove explanatory comment.
line 262, Remove "shellcheck disable" comment.
line 263 > 261, Change an unquoted command substitution containing an `ls` command into a glob expression on the same directory path. 
line 264 > 261, Move the "type" directory name up one line.
line 262, Add a test `[` for the existence of such a directory ( "$j" ).
line 264 > 262, Change the argument to the `cat` command.
lines 263 & 264, Add two parameter expansions of "$j".
Keep the total line count and the later variables "$k" and "$i" on lines 266 and 267, respectively.
@wileyhy
Copy link
Contributor Author

wileyhy commented Jul 30, 2023

Fixes bug #2558

@wileyhy
Copy link
Contributor Author

wileyhy commented Jul 30, 2023

Hi,
Line 1331 has a comment: "# refactor this for globs, but make sure it works across shells," referring to the same shellcheck error, SC2045. Which shells should I test for (and / or versions)? A comment in #2551 mentions "zsh, dash, bash, and mksh."

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

Successfully merging this pull request may close these issues.

None yet

1 participant