Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a menu driven bash script that allows the user to run the diff command on

ID: 3660072 • Letter: W

Question

write a menu driven bash script that allows the user to run the diff command on two files using one of five available options of the command. the script should prompt for the two file names and the option selection after printing a menu of options. additional requirements: the script must have comment statements including your name,(zeynep colak), the date, and the description of the script. 2- one of the options must be the -b option. 3- all the variables used in the script must be named using a prefix containing your initials. for example a student names john henry smith would name a variable used for selection JHS_SELECTION or jhs_selection. 4- you must provide a separate test plan explaining how you tested your script including the test files used for all options in your script.

Explanation / Answer

SOLUTION: WE HAVE: alias Create an alias apropos Search manual for keyword at Schedule a job to run in the future. awk Find and Replace text within file(s) break Exit from a loop builtin Run a shell builtin bunzip2 Decompress file from bzip2 format bzip2 Compress file to bzip2 format cal Display a calendar case Conditionally perform a command cat Concatenate files to standard output cd Change Directory cfdisk Partition table manipulator for Linux chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot Run a command with a different root directory chvt Change the virtual Terminal cksum Print CRC checksum and byte counts clear Clear terminal screen cmp Compare two files comm Compare two sorted files line by line command Run a command - ignoring shell functions compress Compress file(s) to old Unix compress format continue Resume the next iteration of a loop convmv A perl script that converts filenames from one encoding to another cp Copy one or more files to another location cron Daemon to execute scheduled commands at predefined time crontab Schedule a command to run at a later time csplit Split a file into context-determined pieces cut Divide a file into several parts date Display or change the date & time dc Desk Calculator dd Data Dump - Convert and copy a file declare Declare variables and give them attributes df Display free disk space diff Display the differences between two files diff3 Show differences among three files dir Briefly list directory contents dircolors Colour setup for `ls' dirname Convert a full pathname to just a path dirs Display list of remembered directories du Estimate file space usage echo Display message on screen ed A line-oriented text editor (edlin) egrep Search file(s) for lines that match an extended expression eject Eject CD-ROM enable Enable and disable builtin shell commands env Disp, set, or remove environment variables eval Evaluate several commands/arguments exec Execute a command exit Exit the shell expand Convert tabs to spaces export Set an environment variable expr Evaluate expressions factor Print prime factors false Do nothing, unsuccessfully fdformat Low-level format a floppy disk fdisk Partition table manipulator for Linux fgrep Search file(s) for lines that match a fixed string file Determine type of file find Search for files that meet a desired criteria fmt Reformat paragraph text fold Wrap text to fit a specified width. for Expand words, and execute commands format Format disks or tapes free Disp, s memory usage fsck Filesystem consistency check and repair. fstat List open files function Define Function Macros fuser Identify process using file gawk Find and Replace text within file(s) getopts Parse positional parameters grep Search file(s) for lines that match a given pattern groups Print group names a user is in gunzip Decompress file(s) from GNU zip format gzcat Show contents of compressed file(s) gzip Compress file(s) to GNU zip format hash Remember the full pathname of a name argument head Output the first part of file(s) history Command History hostname Print or set system name