Skip to content

cBlueShell/PsTokens

 
 

Repository files navigation

PsTokens

PowerShell token-replacement library.

Usage

Tokens follow the pattern __TokenName__ (case insensitive).

Assuming that the content of .\template.txt is:

FN: __FirstName__
LN: __LastName__

This PowerShell script:

PS> $content = Get-Content .\template.txt | Merge-Tokens -tokens @{'FirstName' = 'foo'; 'LastName' = 'bar'}

Will populate the $content variable with this text:

FN: Foo
LN: Bar

Contributions

About

PowerShell token-replacement library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 100.0%