Giter Site home page Giter Site logo

command-line-workshop's Introduction

command-line-workshop

For this workshop, you will be working inside the DecodeMTL project in your Cloud9. However, you will be creating a separate Git repository to submit your answers.

  • Start by forking this repository to your own GitHub account.
  • In your Cloud9, move to your home directory and clone your fork of the repository
  • You will be doing most of your work inside this cloned, empty repo

History

  • Create a branch cmd-history off of master
  • Create a file called history.txt that contains all your history so far
  • Add and commit this file to Git
  • Push the branch to GitHub and create a pull request to submit your answer

Searching for files

  • Create a branch called finding-files off of master
  • Find all the files in the DecodeMTL project that have the word "logo" in the file name
  • Take the output of the command to a file called files-with-logo.txt
  • Add/commit that file to Git
  • Find all the files in the DecodeMTL project that are over 500KB
  • Take the output of the command to a file called files-over-500kb.txt
  • Add/commit that file to Git
  • Push the branch to GitHub and create a pull request to submit your answer

Searching for content in files

  • Create a branch called finding-content off of master
  • Find all the files in the DecodeMTL project that contain the word "javascript"
  • Take the output of the command to a file called files-with-javascript.txt
  • Add/commit that file to Git
  • Do the same thing you did, but adding the line numbers to the found files
  • Take the output of the command to a file called files-with-javascript-numbers.txt
  • Using the manual page, figure out how to only output the file names only rather than the content
  • Take the output of that new command to a file called filenames-with-javascript.txt
  • Add/commit that file to Git
  • Push the branch to GitHub and create a pull request to submit your answer

Pipes and redirection

  • Create a branch called pipes-and-redirection
  • Install the command-line application called fortune
  • Try running the fortune application by itself
  • Read the manual page for the fortune application to see if you can do anything fun with it
  • Run the fortune application again and send its output to a file called fortune.txt
  • Using the tr command (you'll have to read the manual page), see if you can replace all instances of the letter e with an underscore _ in the fortune .txt file
  • Again, using the tr command, send its output to a file called fortune-replaced.txt
  • Using a combination of fortune and cowsay, try to make the cow say a fortune
  • Take the output of the cow saying its fortune to a file called cow-fortune.txt
  • Add/commit all your files
  • Push the branch to GitHub and create a pull request to submit your answer

Advanced pipes and redirection

  • Learn more about the sort command
  • Learn more about the uniq command
  • Learn more about the wc command
  • Using one of the previous commands, count the number of words in the poem.txt file and send that to a file called poem-words.txt
  • Using one of the previous commands, count the number of lines in the poem.txt file and send that to a file called poem-lines.txt
  • Sort the poem.txt file in alphabetical order, and send this output to poem-sorted.txt
  • Create a file called poem-unique.txt that contains the sorted poem, but without duplicate lines
  • Create a file called poem-popular.txt that contains the lines of the poem sorted in the order they appear most often
  • Create a file called poem-hipster.txt that contains ONLY the lines that appear once in the poem

command-line-workshop's People

Contributors

ziad-saab avatar

Watchers

 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.