General TC > General TC Talk

grep.tcz vs busybox grep speed

<< < (5/5)

Rich:
Hi jazzbiker

--- Quote from: jazzbiker on October 21, 2023, 06:45:46 PM --- ... Then:

--- Code: ---tc@box:/tmp/glob$ ./g*
./ggk
./ggh
./ggg.c

--- End code ---
...
--- End quote ---
That's pretty slick. First  ggg  gets expanded invoking the program, then
the remaining 3 filenames get expanded and passed to the program.

patrikg:
Just a thought with this, the shell globbing feature has some limits, like the command line max char length.

In my shell in my Arch, i can get the max value when executing this command.
This command is new to me..and when using option -a i get all values being set.
Learning every day something new. :)
Don't know if this also contain the env vars.


--- Code: ---getconf ARG_MAX
2097152

--- End code ---
What i can see it's set to 2MB.


--- Code: ---echo $((1024*1024*2))
2097152

--- End code ---

If i google a bit of this i also find that you can get this from xargs iike this.

--- Code: ---xargs --no-run-if-empty --show-limits </dev/null

--- End code ---

--- Code: ---Size of command buffer we are actually using: 131072
--- End code ---
:(:(:(

Happy hacking on your keys.

Navigation

[0] Message Index

[*] Previous page

Go to full version