Git Product home page Git Product logo

phase-0-working-with-programs-in-bash's Issues

Typo?

Canvas Link

https://learning.flatironschool.com/courses/4837/pages/working-with-programs-in-bash?module_item_id=305111

Concern

There is a disconnect between the names used in the examples when running PATH. The names switch between kellyegreene and ianhollander in the text and the examples. It caught me up when first reading it. But I presume it a typo/copy error and I'm not misunderstanding the point?

$ echo $PATH
/Users/kellyegreene/.rvm/gems/ruby-2.7.4/bin:/Users/kellyegreene/.rvm/gems/ruby-2.7.4@global/bin:/Users/kellyegreene/.rvm/rubies/ruby-2.7.4/bin:/Users/kellyegreene/.nvm/versions/node/v8.9.4/bin:/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/local/share/npm/lib/node_modules/grunt-cli/bin:/usr/local:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/kellyegreene/Library/Android/sdk/tools:/Users/kellyegreene/Library/Android/sdk/platform-tools:/Users/kellyegreene/Library/Android/sdk/tools:/Users/kellyegreene/Library/Android/sdk/platform-tools:/Users/kellyegreene/.rvm/bin
Any program in these directories can be run by simply typing the program name. When kellyegreene types ruby the shell starts by looking at the first directory in the PATH to see if it finds a program that matches.

In this case it would find the ruby program in /Users/ianhollander/.rvm/rubies/ruby-2.7.4/bin and run it. The first match in the PATH variable wins so the order of the PATH is important.

Additional Context

No response

Suggested Changes

Makes the names consistent.

$ echo $PATH
/Users/kellyegreene/.rvm/gems/ruby-2.7.4/bin:/Users/kellyegreene/.rvm/gems/ruby-2.7.4@global/bin:/Users/kellyegreene/.rvm/rubies/ruby-2.7.4/bin:/Users/kellyegreene/.nvm/versions/node/v8.9.4/bin:/Applications/Postgres.app/Contents/Versions/9.4/bin:/usr/local/share/npm/lib/node_modules/grunt-cli/bin:/usr/local:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/kellyegreene/Library/Android/sdk/tools:/Users/kellyegreene/Library/Android/sdk/platform-tools:/Users/kellyegreene/Library/Android/sdk/tools:/Users/kellyegreene/Library/Android/sdk/platform-tools:/Users/kellyegreene/.rvm/bin
Any program in these directories can be run by simply typing the program name. When kellyegreene types ruby the shell starts by looking at the first directory in the PATH to see if it finds a program that matches.

In this case it would find the ruby program in /Users/kellyegreene/.rvm/rubies/ruby-2.7.4/bin and run it. The first match in the PATH variable wins so the order of the PATH is important.

If this directory were not in the PATH, kellyegreene would have to do one of the following to run ruby -v โ€” a command that shows the program's version.

$ cd /Users/kellyegreene/.rvm/rubies/ruby-2.7.4/bin
$ ./ruby -v
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-darwin20]
or

$ /Users/kellyegreene/.rvm/rubies/ruby-2.7.4/bin/ruby -v
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-darwin20]

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.