This repository has been archived by the owner on May 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WE GOT THE BASH SCRIPT UP BAYBEEEEEE
- Loading branch information
1 parent
3f9976e
commit e6a5261
Showing
2 changed files
with
47 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/bash | ||
|
||
version="DuskTool-BASH 1.0.0" | ||
|
||
main () { | ||
clear | ||
echo $version | ||
echo "1 - Check /bin/ for a program" | ||
echo "2 - Check /usr/bin/ for a program" | ||
echo "3 - Program info" | ||
echo "Ctrl+C to exit." | ||
echo -n "Enter number: " | ||
read choice | ||
if [ "$choice" = "1" ]; then | ||
echo -n "Check for what: " | ||
read checkfor | ||
checkbin "$checkfor" | ||
main | ||
elif [ "$choice" = "2" ]; then | ||
echo -n "Check for what: " | ||
read checkfor | ||
checkusrbin "$checkfor" | ||
main | ||
fi | ||
} | ||
|
||
checkbin () { | ||
ls /bin/ > "$HOME/bin.txt" | ||
grep -F "$1" "$HOME/bin.txt" | ||
rm "$HOME/bin.txt" | ||
pause | ||
} | ||
|
||
checkusrbin () { | ||
ls /usr/bin/ > "$HOME/usrbin.txt" | ||
grep -F "$1" "$HOME/usrbin.txt" | ||
rm "$HOME/usrbin.txt" | ||
pause | ||
} | ||
|
||
pause () { | ||
echo "Press any key to continue..." | ||
read -r | ||
} | ||
|
||
|
||
main |