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

printf invalid directive from big-red-button.sh #6

Closed
rk295 opened this issue May 16, 2016 · 2 comments
Closed

printf invalid directive from big-red-button.sh #6

rk295 opened this issue May 16, 2016 · 2 comments

Comments

@rk295
Copy link
Contributor

rk295 commented May 16, 2016

Hiya, I noticed the following when trying to run the example script big-red-button.sh. The Ubuntu (15.04) executable /usr/bin/printf lacks %q support. The bash built-in has it however, and changing the #!/bin/sh at the top of the script to #!/bin/bash removes the error.

 ❯ sudo ./bonkers -c examples/big-red-button.sh
State switched from '' to '0 1'
Strange arguments:examples/big-red-button.sh: 44: printf: %q: invalid directive

 ❯ which printf
 /usr/bin/printf
 ❯ /usr/bin/printf --version
 printf (GNU coreutils) 8.23
 Copyright (C) 2014 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.

 Written by David MacKenzie.
 ❯ bash --version
 GNU bash, version 4.3.42(1)-release (x86_64-pc-linux-gnu)
 Copyright (C) 2013 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

 This is free software; you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
 master ❯
@rk295
Copy link
Contributor Author

rk295 commented May 16, 2016

p.s I opened an issue rather than a PR because I wasn't sure if I was missing something!

@fidian fidian closed this as completed in 392e85d May 17, 2016
@fidian
Copy link
Owner

fidian commented May 17, 2016

Sorry about that. You were not missing anything. The shell should have been bash.

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

2 participants