fix: redirection should work on sh
<<< is not supported on sh shell
Pull Request
Title
This fixes the bluetooth manager
Type of Change
- [ ] New feature
- [x] Bug fix
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Hotfix
- [ ] Security patch
- [ ] UI/UX improvement
Description
<<< redirection only works on bash. SInce the shell type of the script is now sh the current redirection fails. This fix should work on both bash and sh
Testing
I ran the script locally to test it works. Further testing might be required.
Impact
The approach with here-string(```) is a better approach and better performance wise because| involves a subprocess
Issue related to PR
- Resolves #246
Additional Information
Checklist
- [ ] My code adheres to the coding and style guidelines of the project.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [x] My changes generate no errors/warnings/merge conflicts.
I'll take a look, thought there might be some issues with this. A more streamline approach might be necessary.
After taking a look at all of the scripts in monitor-control it seems like there are a lot more bashisms than we anticipated, I'm going to make a PR in a bit to change all of these bashisms to posix compliant alternatives.
Alright, check out #282 as every bashism will be removed with that merge.
After taking a look at all of the scripts in monitor-control it seems like there are a lot more bashisms than we anticipated, I'm going to make a PR in a bit to change all of these bashisms to posix compliant alternatives.
Well yeah sorry about that! I've made that script for my personal use initially and later thought of adding it here! I don't know a lot of stuff on posix and other such practices, but thank you :) , I've added few more util scripts using bash which are really good but yeah I'll try implementing it if this pr gets approved.
After taking a look at all of the scripts in monitor-control it seems like there are a lot more bashisms than we anticipated, I'm going to make a PR in a bit to change all of these bashisms to posix compliant alternatives.
Well yeah sorry about that! I've made that script for my personal use initially and later thought of adding it here! I don't know a lot of stuff on posix and other such practices, but thank you :) , I've added few more util scripts using bash which are really good but yeah I'll try implementing it if this pr gets approved.
If you do end up submitting more util scripts please try and keep them posix compliant; if not I'll go through and check occasionally.
After taking a look at all of the scripts in monitor-control it seems like there are a lot more bashisms than we anticipated, I'm going to make a PR in a bit to change all of these bashisms to posix compliant alternatives.
Well yeah sorry about that! I've made that script for my personal use initially and later thought of adding it here! I don't know a lot of stuff on posix and other such practices, but thank you :) , I've added few more util scripts using bash which are really good but yeah I'll try implementing it if this pr gets approved.
If you do end up submitting more util scripts please try and keep them posix compliant; if not I'll go through and check occasionally.
Yeah sure.
Sorry for the inconvenience. We had a massive restructure of the codebase to improve future development. Because of this can you update your PR to the new structure. Thank you for your assistance and contribution.
I'm closing this one. The fix by @nnyyxxxx in #282 should fix this.