If you’re an avid bash user like me, you’re probably interested in ways you can speed-up and otherwise improve your CLI experience. I’ve compiled a list for your enjoyment. Perhaps time will turn this post into a more complete “Bash Tips & Tricks” list in the Magic section, but only maybe.
- This thread on LQ (yes, I’m exit3219)
- This page I’ve found today (make sure you read the comments, too)
- man bash :D
CTRL+Lto clear terminal (you don’t want to input
clearand press Return, do you?)
- Google search for “bash tricks” (this was the first thing you thought about, right?)
- You can use
basenameto get rid of suffixes. How this may prove useful:
for i in *.mp3; do
mplayer “$i” -ao pcm:file=”$i”.wav &&
oggenc -o “`basename “$i”.wav .mp3.wav`.ogg” “$i”.wav &&
rm -fv “$i”.wav
This tiny script converts all mp3 files to ogg, and it changes the extension properly.
Note to self: I must update this. Things have changed a bit since then.