Redirection and piping are two useful features in bash scripting that sysadmins and developers use often. This guide explains what Bash Redirection is and how to work with Redirection in Bash with example commands.
The post Bash Redirection Explained W…
Using Bash scripts can ensure consistent configuration of SSH and other services. Bash is the default shell on most Linux systems these days. It can be used as an interactive command-line interpreter as well as a scripting language to automate common tasks. This article shows you how to use a Bash script to ensure specific […]
This shell script will trigger an email when more than 60% of your system memory is used.
The post Bash Script to Monitor Memory Usage on Linux appeared first on Linux Today.
There are many reasons why it’s useful to use bash and the command line. For example, command-line skills help with building repeatable data processes, the command-line makes working with text files easier, it uses fewer resources, can improve productivity and workflow, it’s great for scripting, and command-line skills are useful for cloud services. This is […]
If you have a long group of commands you need to run press Ctrl-X, followed by Ctrl-E This will open your default editor. When you’re done close the editor (saving the file) and the command will run.
Here is my typical .bashrc file # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # append commenads to bash_history (when using more then one window) shopt -s histappend PROMPT_COMMAND=’history -a’ # User specific aliases and functions PATH=$PATH:$HOME/bin:/sbin #export JAVA_HOME=/usr/java/jdk1.6.0_05/bin/java export HISTIGNORE=”&” export EDITOR=nano export PATH unset USERNAME #function PWD { #pwd | awk -F\/ ‘{print $(NF-1),$(NF)}’ | sed ‘s/ /\\//’ #} #export PS1=”\[\033[0;32m\]\u@\h \[\033[33m\]\$(pwd 3)\[\033[0m\] \$ “;
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy