Below you will find pages that utilize the taxonomy term “Bash”
Trying out zsh (again, maybe?)
It’s been a very, very long time since I tried using a different shell than the bash shell. Back some 10-15 years ago I remember hearing about fish and trying it out. I think it broke some bash paradigms so I went back to bash. I could have sworn I tried zsh in the past, but I could be wrong. I know the last shell I tried out didn’t let me use ‘*’ during a dnf update to update all the packages that start with the same prefix, say all the 1500-ish texlive packages. That annoyed me so I went back to bash. If it was on this computer it was on a previous install or previous /home directory because I couldn’t find any evidence of zsh. No profiles or other such dot files that I could find. (Not that I looked too hard).
Discovered two awesome commandline programs!
First up is tldr. This something I’ve wanted ever since I started with Linux 16 years ago! Basically it gives you the examples part of a man page. For both of these I’m going to use a screenshot because copy/pasting it into the blog doesn’t do it justice.
This is just the first page of man dnf:
the output of man dnf
And this is tldr dnf:
History Meme
[emesa@mario ~]$ uname -a Linux mario.mushroomkingdom 2.6.24.5-85.fc8 #1 SMP Sat Apr 19 12:39:34 EDT 2008 i686 athlon i386 GNU/Linux [emesa@mario ~]$ history | awk ‘{a[$2]++}END{for(i in a){print a[i] " " i}}’ | sort -rn | head 176 ls 172 eog 81 ./makeSpiral.pl 80 cd 61 ./makefibonaccicollage.pl 58 mplayer 51 ./makePolar.pl 36 mv 28 flickr_views.py 24 exit
and root:
[root@mario ~]# history | awk ‘{a[$2]++}END{for(i in a){print a[i] " " i}}’ | sort -rn | head 193 ls 127 cd 102 exit 87 mount 77 yum 71 history 43 emacs 35 cat 20 rm 16 ifconfig Notes:
Another example of when the command line trums the GUI
Whenever you’re working with the file directory structure or with text in general, you can’t do any better than using the command line. For example, I was recently copying a bunch of files off of some old CDs because I was noticing that they were starting to develop bit-rot. (I couldn’t access all the files anymore) For reasons I don’t wish to get into right now, it’s easier to not have spaces in filenames in Linux. It’s not because Linux can’t handle spaces in filenames - it can. But if you’re a semi-hacker like me, spaces in filenames can wreak total havoc on your scripts. So I wanted to remove spaces off of around 200 or so files.
Bash Shell Scripting
One of the best things about Linux is the ability to write shell scripts. These are most often used as utility programs to do repetitive tasks for you. I just wrote my first one on Sunday and here it is followed by commentary.
#!/bin/bash echo "starting xchat..." xchat& echo "starting Gaim..." gaim& echo "starting Thunderbird..." thunderbird& echo "starting Gkrellm (docked)..." gkrellm -w& echo "starting 2 instances of Eterm (transparent, no buttonbar, no scrollbar)" Eterm -x --scrollbar=0 --buttonbar=0 --trans& Eterm -x --scrollbar=0 --buttonbar=0 --trans&