Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Bash commands execution logging for debugging

touch /tmp/diskusage
df -h | tee -a /tmp/diskusage

UStatus=`echo "$?"`

if [ $UStatus -eq 0 ]; then
        sudo logger "Successfully Execuated" -t DiskUsagePass -f /var/log/messages &>/dev/null
else
        sudo logger "Failed To Execuate df command" -t DiskUsageFailed -f /var/log/messages &>/dev/null
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: filesize in linux 
Shell :: graphic driver in ubuntu 
Shell :: git rename branch and force push 
Shell :: get cwd in shell script 
Shell :: how to download octave in ubuntu 
Shell :: tcpdump ubuntu 
Shell :: find syntax in linux 
Shell :: download file from terminal linux 
Shell :: restart linux 
Shell :: linux xargs 
Shell :: git stash only untracked files 
Shell :: sed add a line after a match 
Shell :: mysql password inline cli 
Shell :: bcmatch install 
Shell :: linux cp overwrite directory 
Shell :: how to install clementine music player on ubuntu 
Shell :: how will you clone the following git repository using git cli? 
Shell :: see unimported react comp. 
Shell :: imagemagick merge multiple images 
Shell :: how to install ConfigServer Mail Manage in whm? 
Shell :: install gasreporter 
Shell :: ls list with just names 
Shell :: microsoft ofice activeting code 
Shell :: sed replace specific character position 
Shell :: how to do a conditional check in shell 
Shell :: pacman install fzf 
Shell :: change github release date 
Shell :: tag stale git branches to remove them but be able to restore them if necessary 
Shell :: subtract 
Shell :: ubuntu show RLIMIT_NOFILE 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =