Giter Club home page Giter Club logo

Comments (8)

epogrebnyak avatar epogrebnyak commented on May 31, 2024

https://superuser.com/questions/341192/how-can-i-display-the-contents-of-an-environment-variable-from-the-command-promp#776506

from justpath.

epogrebnyak avatar epogrebnyak commented on May 31, 2024

Wonder why I get this output:

     1 /home/codespace/.local/bin
     1 /home/codespace/.local/bin

for echo $PATH | tr ":" "\n" | uniq -c as there isclearly a duplicate folder

from justpath.

epogrebnyak avatar epogrebnyak commented on May 31, 2024

After sorting uniq does see the duplicates:

@epogrebnyak ➜ /workspaces/what-the-path (main) $ echo $PATH | tr ":" "\n" | sort | uniq -dc
      2 /home/codespace/.local/bin
@epogrebnyak ➜ /workspaces/what-the-path (main) $ echo $PATH | tr ":" "\n" |  uniq -dc

from justpath.

epogrebnyak avatar epogrebnyak commented on May 31, 2024
@epogrebnyak ➜ /workspaces/what-the-path (main) $ echo $PATH | tr ":" "\n" | nl | head -n12
     1  /usr/local/rvm/gems/ruby-3.2.2/bin
     2  /usr/local/rvm/gems/ruby-3.2.2@global/bin
     3  /usr/local/rvm/rubies/ruby-3.2.2/bin
     4  /vscode/bin/linux-x64/8b3775030ed1a69b13e4f4c628c612102e30a681/bin/remote-cli
     5  /home/codespace/.local/bin
     6  /home/codespace/.dotnet
     7  /home/codespace/nvm/current/bin
     8  /home/codespace/.php/current/bin
     9  /home/codespace/.python/current/bin
    10  /home/codespace/java/current/bin
    11  /home/codespace/.ruby/current/bin
    12  /home/codespace/.local/bin

from justpath.

epogrebnyak avatar epogrebnyak commented on May 31, 2024

Ok, uniq need sorting: https://unix.stackexchange.com/questions/114140/uniq-wont-remove-duplicate

from justpath.

epogrebnyak avatar epogrebnyak commented on May 31, 2024

Maybe the flag should be called --recepies or --cookbook - easier to type.

from justpath.

epogrebnyak avatar epogrebnyak commented on May 31, 2024

How to Follow Symbolic Links in Linux
https://linuxhandbook.com/follow-symbolic-link/

from justpath.

epogrebnyak avatar epogrebnyak commented on May 31, 2024

justpath --bare | grep -v -e usr -e home | xargs -l1 realpath

from justpath.

Related Issues (20)

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.