Skip to content

nnyj/bash-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

bash-scripts

Stars

Shell utilities for /etc/profile.d/. Each file is self-contained and sourced on login.

Scripts

  • bash_history.sh: persistent history with dedup across sessions, immediate append on each command, timestamped entries, ignores duplicates and space-prefixed commands
  • disk_utils.sh: hddtemp drop-in replacement using smartctl + jq, scans all drives in parallel, supports SATA (ATA attribute 194) and NVMe temperature sources

Usage

# disk temperature scan
hddtemp
# output: /dev/sda: Samsung SSD 870 EVO:  38°C

History dedup runs on shell exit via trap; it rewrites $HISTFILE in-place, keeping only the last occurrence of each unique command.

Install

sudo ln -s "$(pwd)/bash_history.sh" /etc/profile.d/
sudo ln -s "$(pwd)/disk_utils.sh"   /etc/profile.d/

Dependencies

  • disk_utils.sh: smartmontools, jq

License

MIT

About

Personal bash profile.d scripts and shell utilities

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages