Skip to content

Latest commit

 

History

History
executable file
·
28 lines (24 loc) · 812 Bytes

README.md

File metadata and controls

executable file
·
28 lines (24 loc) · 812 Bytes

Other cheat sheets:

useful tools:

search function

function cheat-grep(){
    if [[ $1 == "" ]]; then
        echo "nothing to search"
        return;
    fi

    search_line=""
    for each_input_arg in "$@"; do
        if [[ $search_line == "" ]]; then
            search_line=$each_input_arg
        else
            search_line=$search_line".*"$each_input_arg
        fi
    done

    rg $search_line -i -A 2 /home/projects/cheat-sheet/*.md /home/projects/bash-example/*
}