Skip to content

Robuster string parsing in bash script #1

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

Merged
merged 1 commit into from
Aug 21, 2020
Merged

Robuster string parsing in bash script #1

merged 1 commit into from
Aug 21, 2020

Conversation

jackonelli
Copy link
Contributor

@jackonelli jackonelli commented Aug 21, 2020

In the avrdude call the elf-file input argument is used:
... -Uflash:w:$1:e
On some systems $1:e is interpreted as the extension of this
argument, i.e. only producing elf instead of the full
<path-to-elf.elf>

Adding curly braces ${1]:e ensures robust parsing.

In the `avrdude` call the elf-file input argument is used:
"... -Uflash:w:$1:e".
On some systems the "$1:e" is interpreted as the extension of this
argument, i.e. only producing "elf" instead of the full
"<path-to_elf.elf>"

Adding curly braces "${1]:e" ensures robust parsing.
@creativcoder creativcoder merged commit 2e6dd32 into creativcoder:main Aug 21, 2020
@creativcoder
Copy link
Owner

Hey @jackonelli Thank you!

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.

2 participants