Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCollection of ideas for new functions #7
Comments
|
String
Arithmetic
Filesystem
|
|
@leeleeee Sounds great. Especially the |
|
@sharkdp What do you think if we can add du or something like this? |
In which sense? Like a By the way, I just realized that the coreutils > du | filter -c1 greater_than 8000 | map -c2 abspath
8340 /tmp/demo/folder/subdirectory
8408 /tmp/demo/folder
8480 /tmp/demo |
|
Yeah, more precisely it is $ find . | map basename | filter startswith test_ | map filesize mb
test_file1 1MB
test_file2 5.2MB It is fantastic that linux commands are work very well with these functions. |
|
|
|
|
Does split currently work with variable size of whitespace between words? if not, does it make sense to add it? Something like below by default if no separator is provided, then it would be a nice replacement for awk
|
It does not (yet). We could either provide a |
|
The |
|
I think array-reverse can be useful. Not sure if we need a string-reverse function. |
|
Hey @sharkdp, what about creating a
|
|
@guilhermeleobas Sounds great! |
|
These days, new unix/linux CLI tools are coming out supporting JSON outputs. Would it make sense to create a json function that can parse JSON outputs? |
I've been thinking about JSON support in the past, so this sounds interesting. What would this function do, exactly? |
|
I can imagine there would a command named
The And then there would also a function called
In this case, the assumption is that the
In the above command, the |
|
Do you know |
|
@sharkdp |
|
More functions that should be implemented:
|
echo 3.1415 | map format "{:.2f}")