You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the guide, I'm really grateful.
But could I suggest to you to change the dummy script to something maybe less potential harmful, for example:
if [ -z"$1" ];thenecho"No command number passed"exit 2
fi
exists=$(fc -l -1000 | grep ^$1 -- 2>/dev/null)if [ -n"$exists" ];thenecho"This would have been executing the command:"echofc -s -- "$1"elseecho"Command with number $1 was not found in recent history"exit 2
fi
Ran the history command to see what was in there and thought,- ups dothis could also work as an effective foot amputation device if entering the wrong number. 😲😀