#bashshell — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #bashshell, aggregated by home.social.
-
Fun #BashShell #LinuxTip for when you want to remove a bunch of similar commands from the bash history.
> for i in `history | grep -i [part of command to remove] | cut -f 1 -d ' ' | sort -r ` ; do history -d ${i} ; done
The [part of command to remove] should be enough so you find the commands you want to remove, without accidentally including others.
The "sort -r" reverses the results so history deletes from the end, not the top. Very needed. #LearnedFromExperience
-
Simple Linux Hacks: Group-Based Bash Prompt Customization #BashPrompt #BashShell #Linuxhowto #Linuxadmin #Linux #CustomizeBash
https://ostechnix.com/change-bash-prompt-for-specific-user-group/