Skip to main content

Thread: Search inside your code easily


i know *very* simple, thinking how simple script has helped me on searching code specific words:
code:
#!/bin/bash in *;    if ! [ -d "$i" ];       if [[ $(cat "$i" | grep "$1") ]];          echo "$i"       fi    fi done
it searches files in current directory , outputs ones containing 1st argument, example usage:
code:
alex@mad-pc:~/documents/wallch$ for_every image create_html direct_link imageshack.py imgur.py log.txt screenshots.html start alex@mad-pc:~/documents/wallch$ above files contain word "image"
just sharing....

ever heard of grep -r?

code searching i'd rather recommend tag based approaches ctags or cscope


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Search inside your code easily


Ubuntu

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support