Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
WE GOT THE BASH SCRIPT UP BAYBEEEEEE
Browse files Browse the repository at this point in the history
  • Loading branch information
XDuskAshes committed Aug 24, 2023
1 parent 3f9976e commit e6a5261
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 95 deletions.
95 changes: 0 additions & 95 deletions src/dusktool.bat

This file was deleted.

47 changes: 47 additions & 0 deletions src/dusktool.sh
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

0 comments on commit e6a5261

Please # to comment.