Disclaimer: Code linked from this page is intended as a cleaned-up and commented version of examples from class. Many programs could be further improved with regard to functionality or design, but then they would no longer be as close to what we did in class.
To use this script, put a copy in your directory (simplest thing is to save it with "save page" from a browser -- but see below if you're trying to do this remotely) and use the command chmod u+x mail-file to make it "executable". You can then use it to mail me one or more files containing source code. If you put the script in the same directory as your files to send, you can just type
mail-files pgm1.c pgm2.c ....or if you put the script in your main (home) directory, replace mail-files with ~/mail-files.
It prompts for homework number and text to include as the body of the message, and sends a Cc of the message to your username at trinity.edu.
If you need to get a copy of the script while logged in remotely, saving from a browser won't work well, but the following command should do it:
cp /users/bmassing/Local/HTML-Documents/Classes/CS1120_2017spring/SamplePrograms/Scripts/mail-files .
Note: To obtain a makefile, use your browser's download function; cutting and pasting will likely turn the tabs in the makefile into spaces and cause it to not work. Put the makefile in the directory in which you want to compile. All the makefiles linked from this page begin with brief documentation on their use (the "usage examples").
To use this script, put a copy in your directory and use chmod u+x to make it executable. Then you can type compile-c followed by the name of your source file to compile with recommended options and create an executable with a name based on the sourcefile name (e.g., hello from hello.c.