mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-10-10 04:32:55 +02:00
Correct exit
using, the exit status should be 0~255
According to the POSIX Programmer's Manual, the exit status specified by the unsigned decimal integer. If n is specified, but its value is not between 0 and 255 inclusively, the exit status is undefined. By cross reference the usage between different scripts in this project, it looks like we could simply remove the `-` before the number.
This commit is contained in:
@ -28,7 +28,7 @@ check_result() {
|
||||
|
||||
remove_quotes
|
||||
json_result="$(awk '/id.*'"${1}"'/,/finding.*$/' $FILE)"
|
||||
[[ -z $json_result ]] && exit -1
|
||||
[[ -z $json_result ]] && exit 1
|
||||
# is4lines?
|
||||
finding_value="$(awk -F':' '/finding/ { print $2" "$3" "$4 }' <<< "$json_result")"
|
||||
if [[ $# -eq 2 ]]; then
|
||||
|
Reference in New Issue
Block a user