diff options
Diffstat (limited to 'README.org')
-rw-r--r-- | README.org | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -230,21 +230,32 @@ Perform infile grep in all the configurations ck keeps track of. Takes one argument, the *search-term*. -To search for terms with spaces you have to put them in escaped quotes. -To search for special symbols you have to enclose them in quotes and escape them. +To search for terms with spaces you have to put them in quotes. Usage: #+BEGIN_SRC sh # search for parenthesis - $ ck search "\(" + $ ck search \( # search term with spaces - $ ck search "\"This is a space\"" + $ ck search "This is a space" # both - $ ck search "\"(add 2 4)\"" + $ ck search "(add 2 4)" # and a normal one $ ck search alias #+END_SRC +If you want to use more advanced grep techniques or even +a different pattern matching program you can do it like so: + +#+BEGIN_SRC sh + # with xargs + $ ck ls paths | xargs grep -E 'A|B' + # or in bash + $ for i in $(ck ls paths); do grep -E 'A|B' $i; done + # or in zsh + $ for i ($(ck ls paths)) grep -E 'A|B' $i +#+END_SRC + *** edit or e or -e |