mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2025-03-14 10:02:43 +00:00
Update 'echo -n' example
Putting `echo -n` in backticks isn't a productive example, since command substitution (backticks, or `$()` in Bash) already removes the trailing newline(s). References: * <https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html> * <http://heirloom.sourceforge.net/sh/sh.1.html#4>
This commit is contained in:
parent
a59c8598b0
commit
51b64c1433
@ -2590,7 +2590,9 @@ printf 'hello world\n%.0s' {1..5}
|
|||||||
```
|
```
|
||||||
##### Do not echo the trailing newline
|
##### Do not echo the trailing newline
|
||||||
```bash
|
```bash
|
||||||
username=`echo -n "bashoneliner"`
|
echo -n "Doing the things... "
|
||||||
|
# (do things)
|
||||||
|
echo "done."
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Copy a file to multiple files (e.g copy fileA to file(B-D))
|
##### Copy a file to multiple files (e.g copy fileA to file(B-D))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user