{"id":1409,"date":"2019-09-05T12:00:00","date_gmt":"2019-09-05T15:00:00","guid":{"rendered":"http:\/\/www.bfnetworks.com.br\/?p=1409"},"modified":"2023-01-15T19:20:35","modified_gmt":"2023-01-15T22:20:35","slug":"comparacoes-shellscript","status":"publish","type":"post","link":"https:\/\/bfnetworks.com.br\/comparacoes-shellscript\/","title":{"rendered":"COMPARANDO STRING, N\u00daMEROS, ARQUIVOS EM SHELLSCRIPT"},"content":{"rendered":"\n
Mostraremos como fazer compara\u00e7\u00f5es num\u00e9ricas, de strings e arquivos em seus comandos em linux ou scripts em shell. <\/p>\n\n\n
num1 -eq num2<\/td> | check if 1st number is equal to 2nd number<\/td><\/tr> | ||||||||||||||||||||||||||||||||||
num1 -ge num2<\/td> | checks if 1st number is greater than or equal to 2nd number<\/td><\/tr> | ||||||||||||||||||||||||||||||||||
num1 -gt num2<\/td> | checks if 1st number is greater than 2nd number<\/td><\/tr> | ||||||||||||||||||||||||||||||||||
num1 -le num2<\/td> | checks if 1st number is less than or equal to 2nd number<\/td><\/tr> | ||||||||||||||||||||||||||||||||||
num1 -lt num2<\/td> | checks if 1st number is less than 2nd number<\/td><\/tr> | ||||||||||||||||||||||||||||||||||
num1 -ne num2<\/td> | checks if 1st number is not equal to 2nd number<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\nSTRINGS<\/h3>\n\n\n
|