From 6ad9f693d51907827d5a24fb26383cbcc8f63773 Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Vuotto Date: Wed, 17 Jul 2024 20:59:47 +0000 Subject: [PATCH] shrc: provide an alias for number of CPUs online --- dotfiles/shrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotfiles/shrc b/dotfiles/shrc index b8005c7..15ed067 100644 --- a/dotfiles/shrc +++ b/dotfiles/shrc @@ -40,6 +40,10 @@ if [ -d ~/local/libdata/perl5/site_perl ]; then export PERL5LIB fi +if [ -x /sbin/sysctl ] && /sbin/sysctl -n hw.ncpuonline >/dev/null 2>&1; then + alias ncpu="/sbin/sysctl -n hw.ncpuonline" +fi + PS1= case $SHELL in