Linux › Section K · Shell scripts › Topic K.6
Important shell script utilities
The shell itself is good at running programs and poor at editing text or doing sums, so scripts lean on a handful of small utilities. basename, awk, sed, xargs, shell arithmetic and exec cover most of what everyday scripts need.
In this topic
- Small tools that scripts rely on
- basename and dirname
- Worked example: changing file extensions
- awk: printing fields
- Worked example: totalling a column with awk
- sed: substitution
- sed: addresses, deleting and printing
- xargs and find -exec
- Arithmetic: $(( )) and expr
- exec
- Common mistakes to avoid
- Key takeaways
This topic is part of Wuanberri Pro. Checking your access…
