Giter VIP home page Giter VIP logo

0x02-shell_redirections-temp's Introduction

describe what each script is doing

0: "echo" is the linux command that will print [display]. "Hello world" is the string that needs to be printed.
1: Between grep and echo, not sure yet so I will have to revisit as I keep getting "unexpected EOF"
2: "cat" is the linux command that prints out the content of the file, followed by the name of the file you want to display.
3: "cat" is the linux command that prints out the content of the file, followed by the name of the file you want to display. In this case, we want to display two of them, so we write out both of them.
4: Dora's tip was most helpful (also helped me know I was on the right track for the previous "display text" exercises). "tail" is the linux command that prints out the last 10 lines of the file.
5: "head" is the linux command that prints out the first 10 lines of the file we want to display.
6: "head" outputs the first part of the file, with the third line specified with "-n 3". "tail -n 1" specifies that only one line should print out to display.
7: This has to do with 1, which I am not sure about but I think my Synopsis is in the right direction.
8: "ls -la" will take the contents of its own output and append it to the file "ls_cwd_content". Since the file doesn't even exist, it will be created (unsure if you can use ">" to do this as well).
9: We want to duplicate the last line, so we need to use "tail". Being it's the last line (we want to duplicate), we need to use "-n 1". Lastly, we need to name the file we want this script to execute on (to duplicate the last line).
10: "find" is the command. I'm not sure what ~ does. "-type f" classifies it as a regular file. '-name "*JPG"' specifies the name of the files we are looking for, with the wildcard+JPG enclosed in quotations to prevent pathname expansion by the shell. '-delete' deletes.
11: I am in the right direction but keep getting an error message on the "wc -1" format.
12: I get this error message right now: sort: option requires an argument -- 't'
13: "uniq" finds the unique words, with the option -u that only prints the unique lines.
14: "grep" prints out the line when it matches with its designated pattern.
15: "grep -c" prints out the number of lines that contain a particular designated pattern.
16: I have the synopsis down but my code test doesn't output anything.
17: The invert option (-v) option is needed to do the opposite of what would otherwise be a run of the mill grep script.
18: I used my error to fix the syntax of my synopsis, but I still get no output.
19: I believe grep and tr should be used together with a pipeline, but I can't figure out how that code would play out according to syntax.
20:
21: Like most of the challenges, I initially overthought this. Then, I looked at the commands we should be most concerned with today and found my rev, which I guessed to be the command I needed, as I have gotten into the habit of thinking commands from the perspective of the creator.
22:

0x02-shell_redirections-temp's People

Contributors

jtt-berkeley avatar

Watchers

 avatar  avatar

Forkers

emanuel-js

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.