Ask HN: Can I see your scripts?
list:<p><pre><code>    #!&#x2F;usr&#x2F;bin&#x2F;env sh
    
    find | grep -- &quot;$1&quot;
</code></pre>
If you are searching for a Python or a Java package &#x2F; class, it will work because the dots in it will mean &quot;any char&quot; for grep and will match the slashes in its path.<p>oneline:<p><pre><code>    #!&#x2F;usr&#x2F;bin&#x2F;env sh
    tr &#x27;\n&#x27; &#x27; &#x27;; echo
</code></pre>
Puts anything you give in its standard input in one line.<p>L, my journaling tool (whenever I need to get something out of my head or be sure to find it later); I can edit and fix stuff by editing the file it generates after the fact:<p><pre><code>    #!&#x2F;bin&#x2F;sh
    set -e

    CONFIG_FILE=&quot;${HOME}&#x2F;.config&#x2F;Ljournalrc&quot;;

    if [ ! -f &quot;${CONFIG_FILE}&quot; ]; then
        mkdir -p &quot;$(dirname &quot;$CONFIG_FILE&quot;)&quot;
        printf &#x27;JOURNAL_FILE=&quot;${HOME}&#x2F;Documents&#x2F;journal.txt&quot;\n&#x27; &gt;&gt; &quot;${CONFIG_FILE}&quot;
        printf &#x27;VIEWER=less\n&#x27;                                  &gt;&gt; &quot;${CONFIG_FILE}&quot;
        printf &#x27;LESS=&#x27;&quot;&#x27;&quot;&#x27;-~ -e +G&#x27;&quot;&#x27;&quot;&#x27;\n&#x27;                      &gt;&gt; &quot;${CONFIG_FILE}&quot;
    fi

    L=$(basename $0)

    usage() {
        cat &lt;&lt;HERE
    Usage:
        $L           - show the content of the journal
        $L message   - add message to the journal, with a date
        $L + message - add message to the previous entry in the journal
        $L -         - add stdin to the journal
        $L + -       - add stdin to the journal, without a date
        $L e         - edit the journal manually
        $L h, $L -h  - show this help

    Config file is in ${CONFIG_FILE}
    HERE
    }

    if [ &quot;$1&quot; = &quot;h&quot; ] || [ &quot;$1&quot; = &quot;-h&quot; ] || [ &quot;$1&quot; = &quot;--help&quot; ] || [ &quot;$1&quot; = &quot;-help&quot; ]; then
        usage
        exit
    fi

    . &quot;${CONFIG_FILE}&quot;


    if [ &quot;$1&quot; = &quot;e&quot; ]; then
        if [ -z &quot;$EDITOR&quot; ]; then
            if   [ -f &quot;$(which nano)&quot; ];  then
                EDITOR=nano
            elif [ -f &quot;$(which vim)&quot; ];   then
                EDITOR=vim
            elif [ -f &quot;$(which emacs)&quot; ]; then
                EDITOR=emacs
            fi
        fi
        exec &quot;$EDITOR&quot; &quot;${JOURNAL_FILE}&quot;
    fi


    # Don&#x27;t add a new date line
    if [ &quot;$1&quot; = &quot;+&quot; ]; then
        append=&quot;+&quot;
        shift
    fi

    if [ &quot;$1&quot; = &quot;-&quot; ]; then
            stdin=&quot;-&quot;
            shift
    fi


    if [ -z &quot;$stdin&quot; ]; then
        msg=&quot;$@&quot;
    else
        msg=&quot;&quot;
        while read line; do
            msg=$(printf &quot;%s\n%s&quot; &quot;$msg&quot; &quot;$line&quot;)
        done
    fi

    msg=&quot;$(printf %s &quot;$msg&quot; | sed &#x27;s|^|\t|g&#x27;)&quot;


    if [ -z &quot;$msg&quot; ] &amp;&amp; [ -z &quot;$append&quot; ]; then
        if [ ! -f ${JOURNAL_FILE} ]; then
            exec usage
        else
            exec &quot;${VIEWER}&quot; -- &quot;${JOURNAL_FILE}&quot;
        fi
    fi

    if [ -z &quot;$append&quot; ]; then
        printf &quot;\n%s:\n\n&quot; &quot;$(date -R)&quot; &gt;&gt; ${JOURNAL_FILE}
    fi

    printf &quot;%s\n&quot; &quot;$msg&quot; &gt;&gt; ${JOURNAL_FILE}</code></pre>