You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`<N>`**Any number**: Specifies a **minimum field width**, if the text to print is shorter, it\'s padded with spaces, if the text is longer, the field is expanded
167
+
`<N>`**Any number**: Specifies a **minimum field width**, if the text to print is shorter, it's padded with spaces, if the text is longer, the field is expanded
168
168
`.`**The dot**: Together with a field width, the field is **not** expanded when the text is longer, the text is truncated instead. \"`%.s`\" is an undocumented equivalent for \"`%.0s`\", which will force a field width of zero, effectively hiding the field from output
169
169
`*`**The asterisk**: the width is given as argument before the string or number. Usage (the \"`*`\" corresponds to the \"`20`\"): `printf "%*s\n" 20 "test string"`
170
170
`#`\"Alternative format\" for numbers: see table below
@@ -178,8 +178,8 @@ introductory `%` and the character that specifies the format:
`%#o` The octal number is printed with a leading zero, unless it\'s zero itself
182
-
`%#x`, `%#X` The hex number is printed with a leading \"`0x`\"/\"`0X`\", unless it\'s zero
181
+
`%#o` The octal number is printed with a leading zero, unless it's zero itself
182
+
`%#x`, `%#X` The hex number is printed with a leading \"`0x`\"/\"`0X`\", unless it's zero
183
183
`%#g`, `%#G` The float number is printed with **trailing zeros** until the number of digits for the current precision is reached (usually trailing zeros are not printed)
184
184
all number formats except `%d`, `%o`, `%x`, `%X` Always print a decimal point in the output, even if no digits follow it
185
185
@@ -382,7 +382,7 @@ readability.
382
382
use `%c`, you\'re actually asking for the first byte of the
383
383
argument. Likewise, the maximum field width modifier (dot) in
384
384
combination with `%s` goes by bytes, not characters. This limits
385
-
some of printf\'s functionality to working with ascii only. ksh93\'s
385
+
some of printf's functionality to working with ascii only. ksh93's
386
386
`printf` supports the `L` modifier with `%s` and `%c` (but so far
387
387
not `%S` or `%C`) in order to treat precision as character width,
388
388
not byte count. zsh appears to adjust itself dynamically based upon
@@ -409,7 +409,7 @@ fmt++;
409
409
- mksh has no built-in printf by default (usually). There is an
410
410
unsupported compile-time option to include a very poor, basically
411
411
unusable implementation. For the most part you must rely upon the
412
-
system\'s `/usr/bin/printf` or equivalent. The mksh maintainer
412
+
system's `/usr/bin/printf` or equivalent. The mksh maintainer
413
413
recommends using `print`. The development version (post- R40f) adds
414
414
a new parameter expansion in the form of `${name@Q}` which fills the
415
415
role of `printf %q`\-- expanding in a shell-escaped format.
@@ -418,7 +418,7 @@ fmt++;
418
418
<!-- -->
419
419
```
420
420
- ksh93 optimizes builtins run from within a command substitution and
421
-
which have no redirections to run in the shell\'s process. Therefore
421
+
which have no redirections to run in the shell's process. Therefore
422
422
the `printf -v` functionality can be closely matched by
423
423
`var=$(printf ...)` without a big performance hit.
424
424
@@ -447,8 +447,8 @@ fmt++;
447
447
448
448
- The optional Bash loadable `print` may be useful for ksh
`-a <ARRAY>` read the data word-wise into the specified array `<ARRAY>` instead of normal variables
45
45
`-d <DELIM>` recognize `<DELIM>` as data-end, rather than `<newline>`
46
-
`-e` on interactive shells: use Bash\'s readline interface to read the data. Since version 5.1-alpha, this can also be used on specified file descriptors using `-u`
46
+
`-e` on interactive shells: use Bash's readline interface to read the data. Since version 5.1-alpha, this can also be used on specified file descriptors using `-u`
47
47
`-i <STRING>` preloads the input buffer with text from `<STRING>`, only works when Readline (`-e`) is used
48
48
`-n <NCHARS>` reads `<NCHARS>` characters of input, then quits
49
49
`-N <NCHARS>` reads `<NCHARS>` characters of input, *ignoring any delimiter*, then quits
@@ -56,7 +56,7 @@ line is read). That means the timeout can occur during input, too.
56
56
When both, `-a <ARRAY>` and a variable name `<NAME>` is given, then the
57
57
array is set, but not the variable.
58
58
59
-
Of course it\'s valid to set individual array elements without using
59
+
Of course it's valid to set individual array elements without using
60
60
`-a`:
61
61
62
62
read MYARRAY[5]
@@ -99,7 +99,7 @@ array name and index:
99
99
Essentially all you need to know about `-r` is to **ALWAYS** use it. The
100
100
exact behavior you get without `-r` is completely useless even for weird
101
101
purposes. It basically allows the escaping of input which matches
102
-
something in IFS, and also escapes line continuations. It\'s explained
102
+
something in IFS, and also escapes line continuations. It's explained
Copy file name to clipboardExpand all lines: docs/commands/builtin/trap.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Special events
34
34
`EXIT` 0 executed on shell exit
35
35
`DEBUG` executed before every simple command
36
36
`RETURN` executed when a shell function or a sourced code finishes executing
37
-
`ERR` executed each time a command\'s failure would cause the shell to exit when the [`-e` option (`errexit`)](../../commands/builtin/set.md) is enabled
37
+
`ERR` executed each time a command's failure would cause the shell to exit when the [`-e` option (`errexit`)](../../commands/builtin/set.md) is enabled
0 commit comments