Comments (3)
Good idea. This may also be useful in other commands. What about introducing a find
command with a limited set of operations that could be applied?
For example, to recursively find and remove all nodes whose name begins with foo
starting at the path /bar
:
find -r foo.* /bar --rm
The implication with --rm
is that --force
would be implied because it seems impractical to add a conditional version check. I could be wrong here, but that is my intuition.
General syntax of find
would be:
usage: find [OPTIONS] PATTERN [PATH] [COMMAND]
PATTERN
is a regular expression, either very basic syntax or strictly according to the JDK. PATH
is an optional starting path, which defaults to pwd
. COMMAND
would be a limited set of commands that make sense to apply, where something like --print
is the default.
from zookeeper.
Additional features like find would definitely be good. I'd also suggest having a "verbose" option or inversely "quiet" on the find command such that a consumer can more easily find out what the find command is actually doing (which nodes did it match on such that it is removing them?).
from zookeeper.
Finished adding support for find
command. You can get help with zk --help find
. There are also several examples in the README.
Note that this version only supports strict regular expressions as defined by Java 1.6, which means patterns you might expect to work like foo*
must be expressed as foo.*
. I might add simple pattern matching if this becomes too much of a burden for users.
https://github.com/davidledwards/zookeeper/tree/release-1.3
from zookeeper.
Related Issues (20)
- setacl does not work HOT 2
- Develop higher order patterns library HOT 1
- Create project skeleton for zookeeper-patterns HOT 1
- Specifying path with '/' incorrectly parses HOT 4
- Upgrade Scala and Java versions HOT 2
- Display command-level usage information from command line HOT 2
- rm -r -f reports "node has children" HOT 2
- Could `cd` to a non-exist node HOT 5
- Publish site documentation to GitHub Pages HOT 1
- Scala 2.12 version ? HOT 4
- Upgrade to Scala 2.12 and Java 1.8 HOT 1
- Quote escaping HOT 5
- superfluous output in command mode HOT 3
- Upgrade to 3.5 release of ZooKeeper HOT 1
- Upgrade to 2.13 release of Scala
- Upgrade to 1.3 release of sbt
- Upgrade to Java 11
- implement getSessionId HOT 5
- Update dependencies
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 zookeeper.