Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code and program itself tips and tricks to make it bettsr #3

Open
TotallyNotAHaxxer opened this issue Nov 3, 2021 · 0 comments
Open

Comments

@TotallyNotAHaxxer
Copy link

TotallyNotAHaxxer commented Nov 3, 2021

I was looking at your code and well I like the idea of it, however I believe we both know that bash is a very very VERY flexible language and one of the easiest to use even in the most advanced ways coming down to mathematics with bash. When I looked at your code I noticed there isn’t a main function or functions at all separating the certain runs.
.
. Code rubs a lot more smoother and faster when it’s put into functions, it also saves resources of your computer because when nothing is held in a function and is just being constantly read by the machine until the script is called to “ end “ “ bo “ “ bar “ etc it will be constantly using your resources of your CPU and even your GPU which can be heavy for people who have smaller laptops and devices.
.
. You can make functions like this
.’’’shell

Function main() {
Whatever you want your function to be
}
‘’’
And to call it you just slap the function name like main() in this case
.
.
. Another thing to save lines of code would have your banner be read from something like a TXT file instead of in script or system commands.
.
. The final thing I have not really a issue with but could be an issue under heavy use is the output, bash I know has a SHIT ton of settings and colors inside of it including handling stuff like lolcat, the output just is a massive jumble of data, so in between echo’s you can use \t to move it to the center or \n in between each line to make a new line, then color each output a different color for each website you search or do run.
.
just some helpful tips from a fellow programmer happy coding 😎💯💙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant