mirror of
https://github.com/flokoe/bash-hackers-wiki.git
synced 2024-11-25 07:43:42 +01:00
updated remaining WRAP blocks with Mkdocs Admonitions
This commit is contained in:
parent
267eb1add1
commit
3fa1627998
@ -41,12 +41,13 @@ command](../../syntax/ccmd/arithmetic_eval.md):
|
||||
$ echo "$a - $b - $?"
|
||||
4 - 2 - 0
|
||||
|
||||
<WRAP info> Remember that inside arithmetic evaluation contexts, all
|
||||
other expansions are processed as usual (from left-to-right), and the
|
||||
resulting text is evaluated as an arithmetic expression. Arithmetic
|
||||
already has a way to control precedence using parentheses, so it's very
|
||||
rare to need to nest arithmetic expansions within one another. It's
|
||||
used above only to illustrate how this precedence works. </WRAP>
|
||||
!!! INFO ""
|
||||
Remember that inside arithmetic evaluation contexts, all
|
||||
other expansions are processed as usual (from left-to-right), and the
|
||||
resulting text is evaluated as an arithmetic expression. Arithmetic
|
||||
already has a way to control precedence using parentheses, so it's very
|
||||
rare to need to nest arithmetic expansions within one another. It's
|
||||
used above only to illustrate how this precedence works.
|
||||
|
||||
Unlike `((`, being a simple command `let` has its own environment. In
|
||||
Bash, built-ins that can set variables process any arithmetic under
|
||||
|
@ -20,18 +20,17 @@ If `<NAME...>` is given, the line is word-split using
|
||||
`<NAME>`. The remaining words are all assigned to the last `<NAME>` if
|
||||
more words than variable names are present.
|
||||
|
||||
<WRAP center round info 90%> If no `<NAME>` is given, the whole line
|
||||
read (without performing word-splitting!) is assigned to the shell
|
||||
variable [REPLY](../../syntax/shellvars.md#REPLY). Then, `REPLY` really contains
|
||||
the line as it was read, without stripping pre- and postfix spaces and
|
||||
other things!
|
||||
!!! INFO
|
||||
If no `<NAME>` is given, the whole line
|
||||
read (without performing word-splitting!) is assigned to the shell
|
||||
variable [REPLY](../../syntax/shellvars.md#REPLY). Then, `REPLY` really contains
|
||||
the line as it was read, without stripping pre- and postfix spaces and
|
||||
other things!
|
||||
|
||||
while read -r; do
|
||||
printf '"%s"\n' "$REPLY"
|
||||
done <<<" a line with prefix and postfix space "
|
||||
|
||||
</WRAP>
|
||||
|
||||
If a timeout is given, or if the shell variable
|
||||
[TMOUT](../../syntax/shellvars.md#TMOUT) is set, it is counted from initially
|
||||
waiting for input until the completion of input (i.e. until the complete
|
||||
|
@ -61,8 +61,9 @@ they are succesfully locked, and can operate without colliding. Setting
|
||||
the timestamp is similar: One step to check the timespamp, a second step
|
||||
to set the timestamp.
|
||||
|
||||
<WRAP center round tip 60%> <u>**Conclusion:**</u> We need an
|
||||
operation that does the check and the locking in one step. </WRAP>
|
||||
!!! NOTE ""
|
||||
<u>**Conclusion:**</u> We need an
|
||||
operation that does the check and the locking in one step.
|
||||
|
||||
A simple way to get that is to create a **lock directory** - with the
|
||||
mkdir command. It will:
|
||||
|
Loading…
Reference in New Issue
Block a user