This post is a good introduction to bash scripting/programming.
This post is a good introduction to bash scripting/programming.
I write code mainly in R, and from times to times, in C, C++, SAS, bash, python, and perl. There are style guides out there that help make your code more consistent and readable to yourself and others. Here is a style guide for C++, and here is Google’s style guide for R and here… Read more »
Suppose I wrote a bash script with usage script.sh filename.type. That is, the script takes in filenames as arguments. Bash’s tab completion works with all files. However, I’ve seen commands that will complete the filename even faster because it will select the file with the “right” extension. For example, pdflatex firstpart[Tab] would automatically select firtpart.whatever.is.next.tex…. Read more »
I found out about DirB through this Linux Journal article. Pretty useful and user-friendly. Don’t know if I’ll remember to use it since I use Dired in Emacs for bookmarking directories. I just need to remember these commands: s — save a directory bookmark. g — go to a bookmark or named directory. p —… Read more »
This site and this site describe some scripts to monitor disk usage of a computer based on the df command and email the ADMIN when disk usage reaches a certain percentage. The scripts can be ran periodically based on cron. These scripts did not work on my local NAS because I have one filesystem called… Read more »