Comments (8)
from justpath.
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.
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 ➜ /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.
Ok, uniq
need sorting: https://unix.stackexchange.com/questions/114140/uniq-wont-remove-duplicate
from justpath.
Maybe the flag should be called --recepies or --cookbook - easier to type.
from justpath.
How to Follow Symbolic Links in Linux
https://linuxhandbook.com/follow-symbolic-link/
from justpath.
justpath --bare | grep -v -e usr -e home | xargs -l1 realpath
from justpath.
Related Issues (20)
- deduplicate directories
- Put up a CI pipeline
- `show --json` may deviate from `show` HOT 12
- add `learn` command
- Add PathVar.from_json()
- feature: check if current directory is on the path
- `--string --correct` breaks `archlinux-java` when setting PATH HOT 8
- Missing ANSI Escape sequence to reset color after output? HOT 9
- brew installable on macs HOT 3
- --tui add experimental text user interface HOT 1
- monday thoughts HOT 3
- split --bare into two flags
- Package not found on conda HOT 2
- separate data model from presentation HOT 2
- ~ may not expand properly HOT 10
- add count using symlinks to --count output
- add Limitations section to docs
- --exclude is not used for --count HOT 3
- add badge for Python Bytes podcast HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from justpath.