Mendeley + BibTeX + Websites

I had some trouble to tell my LaTeX setup to correctly work with the .bib file, that is exported from mendeley.

Now I ended up, modifying my bibliography style to include the field urldate. I just changed the field lastchecked to urldate. The new style is called plainurldate.

Download it here: plainurldate.bst

Bash Example Script #2

I have added the following function to my bash example script:

# Run external command and only procced, when exit code is 0
function try {
	echo "$returnValue"
	if [ $returnValue -ne 0 ]
		log $ERROR "$@ exited with return value \
		$returnValue Script will stop here."
		echo "$@ exited with return value $returnValue. \
		Script will stop here."

The function takes a program as an argument and runs in. If the program returns with a status other then 0, so it fails, then the script will print an error message, log it and and exits. I needed this behaviour in some recent scripts and hope it to be usefull for everybody else.