From 10eb0fa915e941ffaa2c470898beefbeabd63ec0 Mon Sep 17 00:00:00 2001 From: archikid08 Date: Mon, 23 Feb 2026 19:46:37 +0100 Subject: [PATCH] history-del --- usr/bin/bsconn.py | 25 ------------------------- usr/bin/history-del | 8 ++++++++ 2 files changed, 8 insertions(+), 25 deletions(-) delete mode 100755 usr/bin/bsconn.py create mode 100755 usr/bin/history-del diff --git a/usr/bin/bsconn.py b/usr/bin/bsconn.py deleted file mode 100755 index c5db6d6..0000000 --- a/usr/bin/bsconn.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/bash - -if [ "$#" -lt 1 ] || [ "$#" -gt 3 ]; then - echo "Usage: $0 arg1 [arg2] [arg3]" - exit 1 -fi - -# interactive session check -if [ -t 0 ]; then - echo -n "Delete existing output files? [y/N]: " - read ans - case "$ans" in - y|Y) rm -f *.school ;; - *) echo "Aborted"; exit 0 ;; - esac -fi - -# process input file -while IFS= read -r line; do - new_f="${line%.*}.school" - f > "$new_f" -done < "$FILE" - -exit 0 - diff --git a/usr/bin/history-del b/usr/bin/history-del new file mode 100755 index 0000000..c84deb2 --- /dev/null +++ b/usr/bin/history-del @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +NB_LINES=${1:=5} +for ((i=0;i