diego-treitos / linux-smart-enumeration

Linux enumeration tool for pentesting and CTFs with verbosity levels
GNU General Public License v3.0
3.45k stars 574 forks source link

Improve if statement and printf consistency #39

Closed engn33r closed 4 years ago

engn33r commented 4 years ago

Some if statements looked like if $lse_color while others looked like if [ "$lse_color" ], so I added brackets to all of them. Technically we could reduce the file size slightly by removing these brackets if there is only one argument for the if statement - you can decide which you prefer.

And one echo -e command was changed to printf, since this was the last echo I found with a flag (all the cases of echo -n were switched to printf during earlier POSIX compliance migration) . Now echo is only used without a flag.

Let me know if you want these split into two different pull requests.

diego-treitos commented 4 years ago

I am sorry but your PR is not right. Using or not quotes depend on if the variable is a boolean or not. Also I started using printf almost anywhere for POSIX compliance.

Thanks for taking your time anyway.