Results 1 - 18 of about 18 results out of about 57349 pages. (0.03 seconds)

BashSyntaxReference . . . 12 matches
... the current user's home directory.|| ||`~`||`mode=$((mode & ~umask))`||In an [[ArithmeticExpression]], bitwise NOT.|| ||`~`''user''||`cd ~john`||Expands to the home directory of '...

25.0k - rev: 27 (current) last modified: 2024-03-28 14:54:08

BashPitfalls . . . 3 matches
..., the [[BashFAQ/031|[[ command]] should ''not'' be used solely for evaluating [[ArithmeticExpression|arithmetic expressions]]. It should be used for test expressions involving one ...

86.2k - rev: 571 (current) last modified: 2024-02-13 11:17:36

BashFAQ/005 . . . 3 matches
... done <file [[ $REPLY ]] && lines[i]=$REPLY }}} The square brackets create a [[ArithmeticExpression|math context]]. The result of the expression is the index used for assignment. ...

19.7k - rev: 77 (current) last modified: 2023-03-25 22:39:06

BashWeaknesses . . . 2 matches
...sh may not be the best choice. 1. '''Floating point math'''. Bash has only [[ArithmeticExpression|integer math]]. Use `bc(1)` or `awk(1)` if you need to do floating point math....

9.4k - rev: 30 (current) last modified: 2022-09-01 18:14:07

BashGuide/SpecialCharacters . . . 2 matches
...t on the current shell. || || `(( ))` || ''Arithmetic expression'' — with an [[ArithmeticExpression|arithmetic expression]], characters such as `+`, `-`, `*`, and `/` are mathemat...

5.8k - rev: 39 (current) last modified: 2019-02-14 20:04:40

BashFAQ/121 . . . 2 matches
...eat for base (error token is "09") }}} When a zero-padded value is used in a [[ArithmeticExpression|math context]], the value is treated as octal (base 8). In the ''best'' cases,...

1.9k - rev: 1 (current) last modified: 2021-04-30 02:45:52

BashFAQ/031 . . . 2 matches
... {{{[[}}} is used for strings and files. If you want to compare numbers, use an ArithmeticExpression, e.g. {{{ # Bash i=0 while (( i < 10 )); do ... }}} When should the new test c...

10.5k - rev: 51 (current) last modified: 2022-05-09 13:49:40

ProcessManagement . . . 1 match
... See [[BashFAQ/001|reading a file line-by-line]] and [[BashFAQ/005|arrays]] and ArithmeticExpression for explanations of the syntax used in this example. Even if the lists aren't ...

46.6k - rev: 88 (current) last modified: 2023-08-09 06:29:52

CategoryShell . . . 1 match
...##master-page:CategoryTemplate ##master-date:Unknown-Date #format wiki #language en These pages discuss issues associated with the Unix command line shells, especially bash, but a...

0.6k - rev: 2 (current) last modified: 2009-03-11 17:10:59

BashSheet . . . 1 match
...keyword is specialized in performing numeric tests and operations'''. <<BR>>See ArithmeticExpression = Parameters = Parameters are what Bash uses to store your script data in. Th...

54.2k - rev: 91 (current) last modified: 2021-12-20 04:19:50

BashFAQ/105 . . . 1 match
...'s more! === Even if you use `expr(1)` (which we ''do not'' recommend -- use [[ArithmeticExpression|arithmetic expressions]] instead), you still run into the same problem: {{{#!h...

12.5k - rev: 27 (current) last modified: 2021-03-11 06:07:25

BashFAQ/073 . . . 1 match
...ince octal 777 + 1 is octal 1000) which is probably not what was intended. See ArithmeticExpression. Quoting is not needed in variable assignment, since WordSplitting does not o...

12.0k - rev: 53 (current) last modified: 2023-06-24 09:33:51

BashFAQ/067 . . . 1 match
...eading zeroes from a number in bash is to treat it as a decimal integer, in a [[ArithmeticExpression|math context]]: {{{ # Bash x=$((10#$x)) # However, this fails if x co...

3.1k - rev: 27 (current) last modified: 2018-11-29 15:32:42

BashFAQ/022 . . . 1 match
...e with floating point numbers instead of just integers? == [[BASH]]'s builtin [[ArithmeticExpression|arithmetic]] uses integers only: {{{ $ printf '%s\n' "$((10 / 3))" 3 }}} For m...

5.3k - rev: 84 (current) last modified: 2021-09-01 06:31:58

BashFAQ/019 . . . 1 match
...hunk + 1)) cur=$((cur + range)) done }}} The previous example uses POSIX [[ArithmeticExpression|arithmetic]], which older [[BourneShell|Bourne shells]] do not have. In that ca...

2.0k - rev: 162 (current) last modified: 2022-04-19 12:13:19

BashFAQ/017 . . . 1 match
... more powerful comparison commands with slightly different (easier) quoting: * ArithmeticExpression for arithmetic expressions, and * NewTestCommand for string (and file) express...

2.4k - rev: 10 (current) last modified: 2022-10-20 20:40:35

BashFAQ/004 . . . 1 match
...( ${#files[*]} )) || echo directory is empty shopt -u nullglob dotglob }}} See ArithmeticExpression for explanations of arithmetic commands. Of course, you can use any glob you l...

8.4k - rev: 50 (current) last modified: 2023-03-28 07:52:15