eolas/neuron/4e98d18e-1a79-4e78-a4ac-f7e3a2de9887/Utilities_operators_flags.md
2024-10-21 23:11:48 +01:00

580 B

tags
shell

Utilities, operators, flags in Bash

The following are useful built-in utility methods that you can use for checking and validation in the course of your bash scripts.

Flags

Prevent newline

Prevent bash from adding a new line after an echo:

echo 'Your name is Thomas'
echo 'and you are 33 years old'

# Your name is Thomas
# and you are 33 years old
echo -n 'Your name is Thomas '
echo 'and you are 33 years old'

# Your name is Thomas and you are 33 years old

Operators

Mathematical

-lt , -gt,