From 7df5e5e9041c11c18d5bd54983a9c21a3864fadb Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 30 Oct 2024 15:36:05 +0800 Subject: Update --- misc/otp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 misc/otp (limited to 'misc') diff --git a/misc/otp b/misc/otp new file mode 100755 index 0000000..ccdc1f3 --- /dev/null +++ b/misc/otp @@ -0,0 +1,12 @@ +#! /usr/bin/bash + +echo -n "OTP: " +read -r otp + +if grep "^$otp$" /home/pham/.otp; then + TEMP=`mktemp` + sed "/^$otp$/ d" /home/pham/.otp >$TEMP + cat $TEMP > /home/pham/.otp + rm $TEMP + su pham +fi -- cgit v1.2.3-70-g09d2