Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/User-input-Text/Jq/user-input-text-1.jq
Normal file
8
Task/User-input-Text/Jq/user-input-text-1.jq
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
def read(int):
|
||||
null | until( . == int; "Expecting \(int)" | stderr | input);
|
||||
|
||||
def read_string:
|
||||
null | until( type == "string"; "Please enter a string" | stderr | input);
|
||||
|
||||
(read_string | "I see the string: \(.)"),
|
||||
(read(75000) | "I see the expected integer: \(.)")
|
||||
13
Task/User-input-Text/Jq/user-input-text-2.jq
Normal file
13
Task/User-input-Text/Jq/user-input-text-2.jq
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
$ jq -n -r -f User_input.jq
|
||||
"Please enter a string"
|
||||
1
|
||||
"Please enter a string"
|
||||
"ok"
|
||||
I see the string: ok
|
||||
"Expecting 75000"
|
||||
1
|
||||
"Expecting 75000"
|
||||
"ok"
|
||||
"Expecting 75000"
|
||||
75000
|
||||
I see the expected integer: 75000
|
||||
Loading…
Add table
Add a link
Reference in a new issue