Hi,
ShellCheck complains about the implementation of my __inc function:
__inc() {
printf '%d' $(($(< "$1") + 1)) > "$1"
}
As far as I understand, there is no race condition here as the read / write don't occur within the same pipe.
I would guess the $(< "$1") would first read in the value as a whole, right?
Hi,
ShellCheck complains about the implementation of my __inc function:
As far as I understand, there is no race condition here as the read / write don't occur within the same pipe.
I would guess the
$(< "$1")would first read in the value as a whole, right?