Coder Social home page Coder Social logo

bash's Introduction

Bash

Bash Scripting Assignment

CS 3360, fall 2019 Professor Ward Bash Scripting Assignment You need to find a secret message buried in an innocent-looking list of seafood infonnation. Fortunately you know how to extract it since you have intercepted an email with instructions: Greetings Agent X ... to decode, take the lines which contain a four-letter fish name. Each fish name has a two part mock SKU number, e.g. 4443-069. You'll sort by the first part, in ascending order. If it's not odd, ignore it. Each line has a one character payload, which you get from the second part of the SKU by adding 3, and using that as the Ascii code for a character, for example,97 for 'a', 98 for 'b', and so on. Then if it's a letter from a to z, look it up and replace it with the corresponding character in the codebook. Case doesn't matter. For example, hake 3-115 snapper 5-219 bass 181-99 tuna 9-105 char 007-106 pike 846-723 would, after filtering and sorting, give the sequence below, which would then map as follows: 3-115 115 -> 118 -> V 007-106 106 -> 109 -> m 9-105 105 -> 108 -> I 181-99 99 -> 102 -> f

so if the codebook includes l e f p m t V U
the final message will be "utep". The test data above is found in mini-fishlist.txt and mini-codebook.txt. The actual file to decode is innocuous.csv; for this use codebook.txt. All are at the course homepage.

Part I. [8 points] Use Unix commands to discover the secret message. Hint: sort, join, awk, sed and grep may be helpful. Please use mostly Unix commands; do not, for example, write a Python program to call.

Part 2. [8 points] Write a bash script that automates this process, taking as input a fishy file and a codebook, and outputs the secret message found using the rules above.

Hand in hardcopy including: I) the secret message, 2) your bash script, and 3) a one-paragraph report noting any limitations, cleverness, or special features. Perfectionism is discouraged, and in particular your code need not be robust, as long as weaknesses are documented.

bash's People

Contributors

ccabada avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.