From e7999a032bd888abf3665c501a754dbb922fe7c9 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Tue, 2 Feb 2021 03:39:56 +0300 Subject: Switch to org-mode for generating the website --- src/docs/Shell-Conventions.html | 104 ---------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 src/docs/Shell-Conventions.html (limited to 'src/docs/Shell-Conventions.html') diff --git a/src/docs/Shell-Conventions.html b/src/docs/Shell-Conventions.html deleted file mode 100644 index dd841de..0000000 --- a/src/docs/Shell-Conventions.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - -Shell Conventions (Carbs Linux User Manual) - - - - - - - - - - - - - - - - - -
-

-Next: , Up: Conventions   [Contents]

-
-
-

3.1.1 Shell Conventions

- -

Shell is central to Carbs Linux projects. Most of the tools and packages are -written in POSIX sh. -

-
-
[1010]
-

Use 4 spaces for indentation, don’t use tabs. -

-
[1020]
-

Make sure you don’t use bash-specific code. -

-
[1030]
-

Make sure you lint your code with ‘shellcheck’ and if -you are new to POSIX sh, use ‘checkbashisms’. -

-
[1040]
-

Don’t spawn new processes if you don’t absolutely need -to, especially during string manipulation. -

-
[1041]
-

Never use a program for text manupilation that isn’t -defined in the POSIX standard. This includes ‘gawk’ and ‘perl’. -

-
[1042]
-

Instead of $(basename $file), use ${file##*}. -

-
[1043]
-

Instead of $(dirname $file), use ${file%/*}. -

-
- -
-
# 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
-
-
-
[1050]
-

Instead of backticks, use $(..). -

-
- - - - - - -- cgit v1.2.3