Questions tagged [bash-scripting]
Bash scripting is making scripts in the Bash shell language.
2 questions from the last 30 days
7
votes
3
answers
652
views
How to use BASH variables with "local", but less bloated?
I have a lot of code with lines like the following:
local -r foo="$(bar)"
Just recently I discovered shellcheck and that warns about those assignments, because local hides the actual error ...
4
votes
2
answers
177
views
Why can’t I remove a file inside a while-read loop with a Bash script?
I have a polling script that will occasionally pop out the name of a file to delete. The file to delete will always be located on an NFS-mounted filesystem.
So I wrote this Bash script:
#!/bin/bash
/...