Skip to content

Instantly share code, notes, and snippets.

@Bugaddr
Bugaddr / daily-whatis.sh
Created May 26, 2024 17:25
Shell script for printing whatis for executables in /usr/bin folder randomly, just to make you curious and maybe you will find some new command :)
#!/usr/bin/env bash
# File to store previously printed commands
printed_commands_file=~/.local/share/daily-whatis/databases/printed_commands_db.txt
# Check if the file exists, if not create it
if [ ! -f "$printed_commands_file" ]; then
mkdir -p "$(dirname "$printed_commands_file")" # Ensure directory exists
touch "$printed_commands_file" # Create the file
fi