cp: missing destination file operand after

Variable assignments in bash scripts require no space between the variable name and value or (unless quoted) within the value. Since a space was present in the line FILEBACKUPLOCATION= /../…/FMonday, it attempted to execute /../…/FMonday as a command (which caused the first error) with FILEBACKUPLOCATION assigned to an empty string. The variable was then not assigned when the other command … Read more

Inserting a PDF file in LaTeX

Use the pdfpages package. To include all the pages in the PDF file: To include just the first page of a PDF: Run texdoc pdfpages in a shell to see the complete manual for pdfpages.

java.io.IOException: Broken pipe

The most common reason I’ve had for a “broken pipe” is that one machine (of a pair communicating via socket) has shut down its end of the socket before communication was complete. About half of those were because the program communicating on that socket had terminated. If the program sending bytes sends them out and … Read more

Making a Java Makefile

For a simple project without many files or dependencies, I simply use scripts. To build: To run: Replace . with whatever path(s) you need for your source. The * will use any jar on the default path or use a different path like lib/*.

PrintWriter append method not appending

The fact that PrintWriter‘s method is called append() doesn’t mean that it changes mode of the file being opened. You need to open file in append mode as well: Also note that file will be written in system default encoding. It’s not always desired and may cause interoperability problems, you may want to specify file encoding explicitly.