« first day (2473 days earlier)      last day (580 days later) » 

4:55 AM
@Queen k
 
5:12 AM
@invalidsyntax indeed, looks like explainshell is really not able to say anything useful about jq commands )-:
 
@Queen k
 
 
4 hours later…
 
1 hour later…
10:43 AM
@Queen k Community
 
 
4 hours later…
2:44 PM
Hello there! I have a little question: what kind of object does this line return? backup = $(jq . "config.json"). I understand that there is only one type (string), but jq seems to be parsing the json file, right? So, how should I describe this new object? Thank you in advance!
And why do I need the dollar sign there but I don't need it here: version = "current"?
 
 
3 hours later…
5:33 PM
Hello, how can I check if users input is 1 ≥ $input ≤ 65535
I mean I want to check if the number the user gave is a port number or not
 
6:25 PM
@Erikli Assuming you're using a modern(ish) shell, input=65444 ; if (( "$input" > 0 && "$input" < 65536 )) ; then echo "Valid value $input" ; else echo "error: input=$input NOT greater than 1 or less than 65535 "; fi will give you a place to start.
Note that all shells also support -lt, 'le' , -gt' and -ge' so using them, you don't have to adjust your min and max values. Good luck. P.S. Always use the (( math tests )) form (dbl-parens for math tests) when possible.
 

« first day (2473 days earlier)      last day (580 days later) »