One-liners: Difference between revisions
Adds example on how to split large files |
Add a meza one-liner |
||
Line 46: | Line 46: | ||
</source> | </source> | ||
<ref>https://stackoverflow.com/questions/5119946/find-exec-with-multiple-commands</ref> | <ref>https://stackoverflow.com/questions/5119946/find-exec-with-multiple-commands</ref> | ||
And this one in your /opt/conf-meza/public "config" directory | |||
<source lang="bash"> | |||
find . -name '*yml' -o -name '*php' -exec bash -c 'echo -e "\n$0\n"; grep --perl-regexp --only-matching "^\s*(\\\$[^\[ ]+)" '{}' | sed -e "s/^[[:space:]]*//" | sort -u ' '{}' \; | |||
</source> | |||
== Split a big file == | == Split a big file == |