Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonmagic/bash-experiment-20151006
https://github.com/jonmagic/bash-experiment-20151006
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jonmagic/bash-experiment-20151006
- Owner: jonmagic
- Created: 2015-10-06T22:20:39.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-06T22:27:00.000Z (about 9 years ago)
- Last Synced: 2023-04-10T22:39:30.716Z (over 1 year ago)
- Language: Shell
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bash experiment 20151005
Loop through results from find command and extract a part of each result and then test if that path exists.
```bash
$ git clone https://github.com/jonmagic/bash-experiment-20151006
...
$ cd bash-experiment-20151006
``````bash
bash-experiment-20151006 $ tree
.
├── README.md
├── cache
│ └── data
│ ├── a
│ │ ├── 1
│ │ │ └── cache
│ │ ├── 2
│ │ │ └── cache
│ │ ├── 3
│ │ │ └── cache
│ │ └── cache
│ ├── b
│ │ └── 4
│ │ └── cache
│ └── c
│ ├── 7
│ └── 8
│ └── cache
├── data
│ ├── a
│ │ ├── 1
│ │ └── 2
│ ├── b
│ │ ├── 4
│ │ ├── 5
│ │ └── 6
│ └── c
│ ├── 7
│ └── 9
└── run28 directories, 2 files
``````bash
bash-experiment-20151006 $ ./run
cache dir: ./cache/data/a/1/cache
possible associated path: ./data/a/1
found: ./data/a/1cache dir: ./cache/data/a/2/cache
possible associated path: ./data/a/2
found: ./data/a/2cache dir: ./cache/data/a/3/cache
possible associated path: ./data/a/3
not found: ./data/a/3cache dir: ./cache/data/b/4/cache
possible associated path: ./data/b/4
found: ./data/b/4cache dir: ./cache/data/c/8/cache
possible associated path: ./data/c/8
not found: ./data/c/8
```