script3.stx
author Patrik Svestka <patrik.svestka@gmail.com>
Mon, 05 Jul 2021 12:43:35 +0200
branchjv
changeset 1630 7de40ef06ef6
parent 1347 40c47f6d2dc6
child 1498 71eac66f2d96
permissions -rwxr-xr-x
1.7.2 Checking all powershell versions (pick first working one), detecting manual switch from a user, better handling of trucky batch characters Details: - fixing finding powershell (check for all versions and pick first one which is correct) in case the registry holds only powershell key, but is not valid powershell instance - Adding a simple manual_switch_detection variable to detect manual switch from user - make the launcher work better with tricky characters for cmd.exe (|, <, >, &)

#!stx --script
"/
"/ a word count script
"/
|wc|

wc := 0.
[Stdin atEnd] whileFalse:[
    wc := wc + Stdin nextLine asCollectionOfWords size.
].
wc printCR.