I wish I knew this sooner:
:p (as in: $!command:p)
will let you preview which command you're gonna (re-) execute before you pull the trigger. #ShellTips#Bash#linuxcommands
Added bonus: ↑ will bring you to the pre-loaded command in case you do want to run it.
"Russian roulette is not the same without a gun" -Lady Gaga
💡 In Bash, pipes (|) send only stdout, not errors.
⚠️ stderr goes straight to the terminal.
👉 To include errors: cmd1 2>&1 | cmd2
🔧 Use set -o pipefail for safer scripts.
#Bash#Linux#ShellTips#ALX_BE#ALX_SE#ALX_PDBE
Typing less isn’t lazy, it’s efficient.
If you run the same commands daily, let your shell do the work.
Use alias to set shortcuts like :
• alias gs="git status"
• alias ll="ls -la"
• alias ..="cd .."
Now gs runs git status.
Small tweaks, big speed-ups.
#ShellTips#Linux
Tired of typing cd back and forth? 🤯 Use pushd and popd!
🔹 pushd /etc → Switches to /etc & saves your previous dir
🔹 popd → Returns you to the last saved dir
🔹 dirs -v → Shows your directory stack
Effortless navigation! 🚀 #Linux#ShellTips