history-del

This commit is contained in:
archikid08
2026-02-23 19:46:37 +01:00
parent 45f4ae2458
commit 10eb0fa915
2 changed files with 8 additions and 25 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/bash
NB_LINES=${1:=5}
for ((i=0;i<NB_LINES;i++))
do
history -d $(history | tail -n 1 | awk '{print $1}')
done
history -w