These apply to each and every file on the repositories.
# Good way of commenting. your code goes here your code goes here # Avoid this way of commenting.
Shell is central to Carbs Linux projects. Most of the tools and packages are written in POSIX sh.
shellcheck
and if you are new to
POSIX sh, use checkbashisms
. [1030]
gawk
and perl
. [1041]
$(basename $file)
, use ${file##*}
. [1042]
$(dirname $file)
, use ${file%/*}
. [1043]
# This is the same thing as basename /path/to/test.asc .asc
$ file=/path/to/test.asc file=${file##*/} file=${file%.asc}
$ echo $file
test