I have a bash script where I get the disk usage, for example 60%
. How can I remove the %
symbol? Using grep or awk?
Linux – How to remove a certain symbol for a bash script
awkbashgreplinuxscripting
Related Topic
- Linux Bash – How to Sort du -h Output by Size
- Linux command line best practices and tips
- Bash – using awk in a bash script with if
- Linux – How to add a line break before a set of values going into a bash script
- Mysql – How to remove correctly ‘\r’ symbol during the bash script execution
- Pipe grep result to awk with “: ” as field separator
Best Answer
This should do it:
Pipe your string through it for the best results.