October 31, 2012October 31, 2012Tech Bash check a variable is a number or text #!/bin/bash var=a if [ "$var" -eq "$var" ] 2>/dev/null then echo number else echo not a number fi Redirection of […]
May 29, 2012May 29, 2012Tech Using SED to extract text between 2 markers sed -n ‘/FOO/,/BAR/p’ test.txt This will extract all text between place holders FOO and BAR from the text file test.txt