Skip to content

Instantly share code, notes, and snippets.

@platisd
Last active May 9, 2019 12:24
Show Gist options
  • Save platisd/5c9c4062489c1d9e23001120320ff84e to your computer and use it in GitHub Desktop.
Save platisd/5c9c4062489c1d9e23001120320ff84e to your computer and use it in GitHub Desktop.
Useful util scripts placed in my /usr/local/sbin/
#!/usr/bin/env bash
STRING=$1
if [ -z "$STRING" ]
then
echo "Enter as string to look for, e.g.: findfile main.cpp"
exit 1
fi
STRING=\'*$@*\'
eval find . -iname $STRING 2>/dev/null
#!/usr/bin/env bash
STRING=$1
if [ -z "$STRING" ]
then
echo "Enter file to look for, e.g.: findfile main.cpp"
exit 1
fi
STRING=\'$@\'
eval grep --color -r -e $STRING . 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment