#Bashtips

2026-01-10

Bash turns 38 today! Celebrate Bash's 38th birthday with 38 built-in features and essential tips. Learn keyboard shortcuts, parameter expansion, conditionals & more.

Full guide here: ostechnix.com/38-bash-tips-she

#Bash #Shell #Bash38 #Linux #Bashtips #Shelltips #Shellscripting #Linuxhowto #Linuxbasics #Linuxcommands

Meysammeysam81
2025-10-22

TIL: Editing commands from bash history before execution

After years of copy-pasting from `history | grep`, I just learned:

fc 945
→ Opens command #945 in $EDITOR
→ Edit as needed
→ Auto-executes on save

Quick alternative:
!945:p (print command)
↑ (recall and edit)

Or for lighter editor:
fc -e - 945

The fc approach is perfect for complex multi-line edits. The !945:p method is faster for single-parameter changes since you stay in the shell.

Old Hacker Public Radiohpr@botsin.space
2024-04-03

New Episode: hpr4088 :: Today I Learnt more Bash tips

Hosted by Some Guy On The Internet on 2024-04-03 is flagged as Clean and is released under a CC-BY-SA license.

Tags: #BashTips, TTIL, #getopts.

hackerpublicradio.org/eps/hpr4

2024-01-05

Personalize Your BASH Prompt in Linux: Add Colors and Styles to Beautify Your Command Prompt #Bash #BashPrompt #Bashtips #Shell #Linuxshell #Linuxhowto #Linuxtips #Linux
ostechnix.com/how-to-customize

2023-02-22

Bash tip of the day. I always forget things like this! If you want to create a folder with a range of numbers after the title:

mkdir test{1..10}

#linux #bashtips #bash #zsh

2022-12-15

sneak peek of my next bash cutesheet.

#bashtips #cutekeyboardclub

a snippet of table infographic.  the first row reads 0, success. the second reads 1-255, failure.  the graphic uses soft pink and purple colors.
🐧DaveNull🐧 ☣️pResident Evil☣devnull@mamot.fr
2018-03-14

.bashrc
function multiresolv {
dig $@ | sed -n '/;; ANSWER SECTION:/{n;p;}' | awk '{print substr($1, 1, length($1)-1)"\t"$5}'
}

$ source .bashrc
$ multiresolv domainame1.tld domainame2.tld domainame3.tld domainame4.tld
domainame1.tld IP1
domainame2.tld IP2
domainame3.tld IP3
domainame4.tld IP4

#bashtips

🐧DaveNull🐧 ☣️pResident Evil☣devnull@mamot.fr
2018-03-12

.bashrc
function keyinfo {
gpg $1 2>/dev/null
}

$ keyinfo somekey.asc

#gpgtips #bashtips

🐧DaveNull🐧 ☣️pResident Evil☣devnull@mamot.fr
2018-03-08

#bashtips #bashrc

function setproxy() {
export {http,https,ftp}_proxy='<http://greatfirewall.bullshit.tld>:<PORT>'
}

function unsetproxy() {
unset {http,https,ftp}_proxy
}

function httpretcode {
curl -sIL $1 | grep HTTP | tail -n1 | cut -d " " -f 2
}

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst