ZupIT/horusec

horusec install.sh: issues with cut and tail command on some linux and mac

smoogie opened this issue · 0 comments

What would you like to be added:
In installation scripts - replace the long name of parameters for cut and tail with shorthands like -d instead of --delimeter, -f instead of --fields, -n instead of --lines

Why is this needed:
In some machines, there is an issue with installation scripts.
For example on some mac we get error:

cut: illegal option -- -
...

and

tail: illegal option -- -
...

This comes from: cut --delimiter='/' --fields=3 | tail --lines=1

This is due to the versions of cut and tail installed on different systems. For example https://ss64.com/osx/cut.html

To solve the issue, we should replace the long name of parameters with shorthands like -d instead of --delimeter, -f instead of --fields, -n instead of --lines