learn-co-curriculum / phase-0-working-with-programs-in-bash Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
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.
No response
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]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.