eolas/neuron/4d2bba6b-63bd-4db1-a13f-46d124ed7b38/Utilities_operators_flags.md

39 lines
580 B
Markdown
Raw Normal View History

2024-12-09 18:34:15 +00:00
---
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:
```bash
echo 'Your name is Thomas'
echo 'and you are 33 years old'
# Your name is Thomas
# and you are 33 years old
```
```bash
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
```bash
-lt , -gt,
```