diff options
author | zjopy <33468089+zjopy@users.noreply.github.com> | 2020-05-07 13:48:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 13:48:48 +0200 |
commit | 761b7efb3b8a140caad12803619a2e8a535cc178 (patch) | |
tree | c046d2fe25453713284e1670f10ceae05bac2673 /std/examples/xeval.ts | |
parent | 34ec3b225425cecdccf754fbc87f4a8f3728890d (diff) |
fix(docs): add missing "deno run" (#5126)
Diffstat (limited to 'std/examples/xeval.ts')
-rw-r--r-- | std/examples/xeval.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/std/examples/xeval.ts b/std/examples/xeval.ts index 6589fec16..d688a6bf7 100644 --- a/std/examples/xeval.ts +++ b/std/examples/xeval.ts @@ -14,16 +14,16 @@ const HELP_MSG = `xeval Run a script for each new-line or otherwise delimited chunk of standard input. Print all the usernames in /etc/passwd: - cat /etc/passwd | deno -A https://deno.land/std/examples/xeval.ts "a = $.split(':'); if (a) console.log(a[0])" + cat /etc/passwd | deno run -A https://deno.land/std/examples/xeval.ts "a = $.split(':'); if (a) console.log(a[0])" A complicated way to print the current git branch: - git branch | deno -A https://deno.land/std/examples/xeval.ts -I 'line' "if (line.startsWith('*')) console.log(line.slice(2))" + git branch | deno run -A https://deno.land/std/examples/xeval.ts -I 'line' "if (line.startsWith('*')) console.log(line.slice(2))" Demonstrates breaking the input up by space delimiter instead of by lines: - cat LICENSE | deno -A https://deno.land/std/examples/xeval.ts -d " " "if ($ === 'MIT') console.log('MIT licensed')", + cat LICENSE | deno run -A https://deno.land/std/examples/xeval.ts -d " " "if ($ === 'MIT') console.log('MIT licensed')", USAGE: - deno -A https://deno.land/std/examples/xeval.ts [OPTIONS] <code> + deno run -A https://deno.land/std/examples/xeval.ts [OPTIONS] <code> OPTIONS: -d, --delim <delim> Set delimiter, defaults to newline -I, --replvar <replvar> Set variable name to be used in eval, defaults to $ |