====== CS 370 List of Projects ====== You will be writing shell scripts for projects. It is suggested that you use the [[https://www.shellcheck.net/|shellcheck]] command to check your shell script syntax and style. The ''shellcheck'' command is installed on all Linux lab machines and Linux servers. ---- ===== Project 2 ===== Deadline: Mon, Jul 3, 11:59pm You will present the project to me in class on Mon, Jul 3. You have the following project options: Option 1: [[https://docs.google.com/document/d/1n50ytX_LCwiqD5eF_5LD8OS_0Y7eyOOykzB7Au-hrzM/edit?usp=sharing|names2userids.sh]] (mandatory option for CS-599) Option 2: [[https://docs.google.com/document/d/17THMU0BPJ8vIOfNvbR2113MrGsRJUHwJ0BrRVOidie4/edit?usp=sharing|fnamefix.sh]] ---- ===== Project 1 - txt2pdf.sh ===== Deadline: Fri, Jun 16, 11:59pm Discuss the project on Piazza Q&A: [[https://piazza.com/class/lhsjj388lu51o8/post/15|LINK]] See related class recordings: [[https://youtu.be/MpS7M5rnIvU?t=5175|Jun 8]], [[https://youtu.be/CZ_8vQr9Xkw|Jun 13]] In a group of at least two students, create a simple shell script called ''txt2pdf.sh'' that, when called with the name of a text file, converts the text file to PDF. An example usage would be txt2pdf.sh textfile.txt For this example [[http://plato.monmouth.edu/~jchung/download/fortune.txt|fortune.txt]] file, the resulting PDF file must be named [[http://plato.monmouth.edu/~jchung/download/fortune.txt.pdf|fortune.txt.pdf]]. The ''txt2pdf.sh'' script will also be able create a PDF with 2 pages of text per sheet using the ''--2'' or ''-2'' option. The example usage for 2-pages-per-sheet mode would be txt2pdf.sh --2 textfile.txt and the resulting PDF file must look like the following: [[http://plato.monmouth.edu/~jchung/download/fortune-2pg.txt.pdf|fortune.txt.pdf]]. If the input textfile [[cs370/cs_370_-_shell_scripting?&#filedirectory_tests|does not exist]], the script must exit with an error message: ''"Input file not found."'' The script will require the use of three programs in a pipeline (''enscript'' or ''paps'', ''psnup'' and ''ps2pdf''). The script must include the use of a ''--help'', ''-help'' or ''-h'' option to display a synopsis, explanation of script options and example script usages. The final script code must include comments to explain, in detail, what each part of the script does. Include your group member names and student IDs in a script comment. ==== Links ==== * [[cs370/cs_370_-_command_line_option_handling|shell script commandline argument handling]] ==== How to turn in ==== Decide on a final version of your group's ''txt2pdf.sh'' script. Each person in the group needs to create a ''~/cs370/projects/1-txt2pdf'' or ''~/se370/projects/1-txt2pdf'' directory and then copy the ''txt2pdf.sh'' script and any input text files to that directory. Group member names and IDs must be in the ''txt2pdf.sh'' script in comments. Run the ''submit.cs370'' or ''submit.se370'' command. Don't forget to ''shellcheck'' your script. ----