Upload files to ''

This commit is contained in:
JaydenMW 2021-03-08 18:23:38 +00:00
parent dac781b7fd
commit 5c028c7ff8
2 changed files with 25 additions and 0 deletions

12
command-search.sh Normal file
View File

@ -0,0 +1,12 @@
# Arguments
SEARCH=$1
# Throw an error if no arguments are provided
if [ "$*" == "" ]; then
echo "You must provide arguments. ./command-search.sh <search query>"
exit 1
fi
# Take these arguments and search the manpage for the search query
ls /usr/bin | grep -x $SEARCH --color=auto || echo "This command is not available/installed"

13
man-search.sh Normal file
View File

@ -0,0 +1,13 @@
# Arguments
PAGE=$1
SEARCH=$2
# Throw an error if no arguments are provided
if [ "$*" == "" ]; then
echo "You must provide arguments. ./man-search.sh <man page> <search query>"
exit 1
fi
# Take these arguments and search the manpage for the search query
man $PAGE | grep $SEARCH --color=auto || echo "Your search query wasn't found in this manpage"