Inverted index: Difference between revisions
Content added Content deleted
(jq) |
m (→{{header|jq}}: shorten lines) |
||
Line 1,660: | Line 1,660: | ||
<lang jq>def prompt_search: |
<lang jq>def prompt_search: |
||
"Enter a string or an array of strings to search for, quoting each string, or 0 to exit:", |
"Enter a string or an array of strings to search for, quoting each string, or 0 to exit:", |
||
( (input | if type == "array" then . elif type == "string" then [.] |
( (input | if type == "array" then . elif type == "string" then [.] |
||
else empty |
|||
end) as $in |
|||
| search($in), prompt_search ) ; |
| search($in), prompt_search ) ; |
||
Line 1,666: | Line 1,668: | ||
'''Example''': |
'''Example''': |
||
⚫ | |||
<lang sh> |
|||
⚫ | |||
Enter a string or an array of strings to search for, quoting each string, or 0 to exit: |
Enter a string or an array of strings to search for, quoting each string, or 0 to exit: |
||
"is" |
"is" |