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 inputclearand 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
doneThis 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.

March 1, 2007 at 21:27 |
[...] Bash tricks, etc [...]
March 25, 2007 at 17:34 |
[...] mai gasit un post interesant intr-un blog de al nostru, a lui exit3219 Bash tricks, etc. , nu uitati sa treceti prin sectiunea [...]