dev:bash

Bourne Again Shell (Bash) Scripting

  • import – module system for Bash and other Unix shells.

Backslash escapes the character coming after it, if that's the end of the line, you basically "remove" the newline. Watch out to not have any spaces or other characters after the backslash, just the newline!

# In general
$ echo "foo" \
> "bar"
foo bar
 
# Pipes
$ echo foo |
> cat
foo
 
# && and ||
$ echo foo &&
> echo bar
foo
bar
$ false ||
> echo bar
bar

(source)

  • Last modified: 2024-07-05 14:31