I've come across the following code and can not understand what operation the double exclamation marks provide. This code-snipet is from a FAKE script used in a CICD system. Microsoft's Symbol and Operator Reference does not list this operator, nor can I find it in FAKE's API Reference.
!! (projectPackagePath + "/*.zip")
|> Seq.iter(fun path ->
trace ("Removing " + path)
ShellExec tfCommand ("delete " + path + " /noprompt")
Another example of usage
let buildLabelFiles =
!!(labelPath @@ "*.txt")
‼ Double Exclamation Mark. Table of Contents. Double Exclamation Mark emoji is two exclamation points next to each other. Exclamation points are used to express shock or surprise, but two exclamation points show an even more extreme form of shock that one exclamation point is just not enough to express.
In Punctuation for Now, John McDermott observes that multiple exclamation points "are best left to schoolchildren and those in love for the first time.". (Brand New Images/Getty Images) An exclamation point (!) is a mark of punctuation used after a word, phrase, or sentence that expresses a strong emotion.
The exclamation mark serves a different purpose, depending on where it’s being used. It’s one of the powerful features of the Bash shell and can help to improve productivity. In this tutorial, we’ll see the various uses of the exclamation mark in Bash. 2. Specifying the Interpreter Path
And "Merriam-Webster's Guide to Punctuation and Style" notes that the exclamation point is used "to mark a forceful comment or exclamation." It is also called an exclamation mark or tellingly, in newspaper jargon, a shriek .
The !!
operator takes a file pattern and returns a collection of files matching the pattern.
For example, if you want to print all text files in the current folder, you can write:
for file in !! "*.txt" do
printfn "%s" file
If you look at the operator definition in the source code, you can see that it is just an alias for creating a IGlobbingPattern
value (see the type definition) that includes files given by the specified pattern. The IGlobbingPattern
type implements IEnumerable
, so you can iterate over the files, but you can do a couple of other things with IGlobbingPattern
such as combining two file sets using ++
or removing some files from a file set using --
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With