Bash: Difference between revisions
Jump to navigation
Jump to search
Line 66: | Line 66: | ||
| valign="top" | | | valign="top" | | ||
* [https://stackoverflow.com/questions/28830225/ Bash read a properties file contains keys & values] | * [https://stackoverflow.com/questions/28830225/ Bash read a properties file contains keys & values] | ||
* [https://stackoverflow.com/questions/39162846/ What does <code>set -e</code> and <code>set -a</code> do in bash] | |||
* [https://stackoverflow.com/questions/918886/ Bash split a string using delimiter] | * [https://stackoverflow.com/questions/918886/ Bash split a string using delimiter] | ||
* [https://stackoverflow.com/questions/5725296/ Difference between sh & bash] | * [https://stackoverflow.com/questions/5725296/ Difference between sh & bash] |
Revision as of 07:55, 31 December 2022
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
count=`wc -l ~/.bash_history|awk '{print $1+1}'`;start_line=$(($count-10));\
for ((line=$count;line>=$start_line;--line));do history -d $line;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 block
if hash __git_ps1 2>/dev/null;then echo '__git_ps1';\
else echo 'no __git_ps1';fi
Knowledge
sudo apt install neofetch neofetch --cpu-brand off neofetch
# add the new key(s) to known_hosts ssh-keyscan -H git.academia.chorke.org >> ~/.ssh/known_hosts # remove the old key(s) from known_hosts ssh-keygen -R git.academia.chorke.org
cat /etc/os-release