Bash: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:
history -d 2013;done;\
history -d 2013;done;\
history -w
history -w
</source>
<source lang="bash">
command -v __git_ps1 >/dev/null 2>&1 || { echo >&2 "__git_ps1 not installed";}
hash __git_ps1 >/dev/null 2>&1 || { echo >&2 "__git_ps1 not installed";}
type __git_ps1 >/dev/null 2>&1 || { echo >&2 "__git_ps1 not installed";}
# check by using if else conditional
if hash __git_ps1 2>/dev/null;then echo '__git_ps1'; \
else echo 'no __git_ps1';fi
</source>
</source>



Revision as of 12:37, 28 May 2019

sudo systemctl stop firewalld
sudo systemctl stop ipchains
sudo systemctl stop iptables

sudo systemctl restart jira
sudo systemctl restart atlbitbucket
# clear all
history -c
history -w

# delete line
history -d 2013
history -w

for i in {1..50};do \
history -d 2013;done;\
history -w
command -v __git_ps1 >/dev/null 2>&1 || { echo >&2 "__git_ps1 not installed";}
hash __git_ps1 >/dev/null 2>&1 || { echo >&2 "__git_ps1 not installed";}
type __git_ps1 >/dev/null 2>&1 || { echo >&2 "__git_ps1 not installed";}

# check by using if else conditional
if hash __git_ps1 2>/dev/null;then echo '__git_ps1'; \
else echo 'no __git_ps1';fi

References