SSBW - Linux Tutorial 3: Text Editing and Shell Scripts

Mike Brudzinski, Miami University-Oxford

Author Profile

Summary

In this interactive tutorial built for a learning management system, students will 1) use a virtual machine to interact with a Linux command line environment, 2) create and edit text files using a graphic user interface, 3) create a c-shell script to store and execute a series of commands, 4) use variables to store information in a shell script.

Used this activity? Share your experiences and modifications

Context

Audience

The IRIS Seismology Skill Building Workshop (SSBW), which is a free, online, open-access, large-enrollment, 12-week summer workshop for upper level undergraduates.

Skills and concepts that students must have mastered

This assignment builds on prior understanding of navigating a Linux command line environment, file and directory administration, filename conventions, redirecting information to or from files, and retrieving information from files.

How the activity is situated in the course

This is assignment number 3 of 35 in the Seismology Skill Building Workshop (SSBW).

Goals

Content/concepts goals for this activity

Proficiency with navigating a Linux command line environment, editing text files, c-shell, shell scripts, program variables, and redirecting information to or from files.

Higher order thinking skills goals for this activity

Retrieving relevant information from digital sources to accomplish tasks, using correct programming syntax, evaluating and describing computing output in the context of broader concepts.

Other skills goals for this activity

Description and Teaching Materials

Students will:
1. Login to a Linux virtual machine and navigate in the command line environment
2. Use the gedit program to open, edit, and save a text file
3. Find and replace text in gedit
4. Create a c-shell script to store a series of commands
5. Set and use variables to store information in a shell script
6. Change the mode of a file and then execute a shell script to run a series of commands
7. Store the output of a shell script in a file

 

Teaching Notes and Tips

This assignment was constructed in the Moodle learning management system, and has been exported in the GIFT format. More information about the syntax of this format can be found here: https://docs.moodle.org/en/GIFT_format

Assessment

This assignment is automatically graded by the learning management system. The number of questions of each type used are:
11 multiple choice questions
5 multiple answer question
1 matching question
1 true/false question
5 short answer (auto-graded) question

References and Resources

During the Seismology Skill Building Workshop, students are provided with a virtual Linux machine that was tailored to include the software specifically needed to complete the assignments. This software is all freely available on the internet, but interested parties are encouraged to contact the instructor for access to this tailored virtual machine.