Add rmhist
This commit is contained in:
parent
13d4e20219
commit
32301eed46
1 changed files with 33 additions and 0 deletions
33
rmhist
Executable file
33
rmhist
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
RM="rm -f"
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
rmhist
|
||||
removes history files
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
rm_history_files() {
|
||||
xargs $RM <<EOF
|
||||
$HOME/.bash_history
|
||||
$HOME/.lesshst
|
||||
$HOME/.octave_hist
|
||||
$HOME/.psql_history
|
||||
$HOME/.python_history
|
||||
$HOME/.tig_history
|
||||
$HOME/.wget-hsts
|
||||
EOF
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--help)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
rm_history_files
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue