Skip to content

Instantly share code, notes, and snippets.

@mattravenhall
Last active December 30, 2017 10:37
Show Gist options
  • Select an option

  • Save mattravenhall/cd9c9019f1a981ee13917885c0e414e3 to your computer and use it in GitHub Desktop.

Select an option

Save mattravenhall/cd9c9019f1a981ee13917885c0e414e3 to your computer and use it in GitHub Desktop.

Revisions

  1. Matt Ravenhall revised this gist Dec 30, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions grepWrapper.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    input=''

    if [ "$1" = '' ]; then
    input='quit'
    echo "Please provide file to search as 'grepWrapper.sh <fileToSearch>'"
    fi

    while [ "${input}" != 'quit' ]; do
    echo "Please provide search sequence, or 'quit':"
    read input
  2. Matt Ravenhall revised this gist Dec 30, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion grepWrapper.sh
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,6 @@ while [ "${input}" != 'quit' ]; do
    echo "Please provide search sequence, or 'quit':"
    read input

    grep ${input} <fileToSearch.txt>
    grep ${input} $1
    echo ''
    done
  3. Matt Ravenhall created this gist Dec 29, 2017.
    9 changes: 9 additions & 0 deletions grepWrapper.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    input=''

    while [ "${input}" != 'quit' ]; do
    echo "Please provide search sequence, or 'quit':"
    read input

    grep ${input} <fileToSearch.txt>
    echo ''
    done