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

Ignore word split warning inside echo #2

Closed
pihentagy opened this issue Jun 5, 2013 · 2 comments
Closed

Ignore word split warning inside echo #2

pihentagy opened this issue Jun 5, 2013 · 2 comments

Comments

@pihentagy
Copy link

12      echo $FIELDMATCH | sed -r "s/#FIELD#/$1/"
             ^–– Unquoted variable may contain spaces/globs, and will word split.
@geirha
Copy link
Contributor

geirha commented Jun 9, 2013

Why? that's a valid warning. It's a bug to not quote that variable expansion.

@koalaman
Copy link
Owner

For simple values like "hello world" (with default IFS), this is merely superfluous.
For any strings that could contain multiple spaces in a row, glob characters like */?, line feeds, tabs, etc, this is a valid warning and most likely a bug.

Working as intended.

gerow pushed a commit to gerow/shellcheck that referenced this issue Jul 29, 2017
@dengyufei123 dengyufei123 mentioned this issue May 19, 2023
4 tasks
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

3 participants