Currently I have the following code below, which does not work for me. I would Like it to behave like this
some-output-from-some-function | FILTER_DATA
or
some-output-from-some-function | FILTER_DATA | Filter_01
With the function below (without the $id included) i need to catch the some-output-from-some-function int ovariable and execute it like this (which does NOT suit me):
$a = some-output-from-some-function
"$a" | FILTER_DATA
Please help. I want it to be universal, not specific to one or two passed arguments ...
Function FILTER_DATA ($id){
[CmdletBinding()]
Param(
[Parameter(ValueFromPipeline)]
$item
)
$item | % {$PSItem.replace("<","<").replace(">",">")} |
% {$PSItem -replace "<table>", "$description<table class=sortable id=$id" `
-replace "</table>","</table></span>" `
}}