file a.txt is:
delete from test_$suffix
$a=get-content a.txt
$suffix="tableA"
how to manipulate the variable to set it as
delete from test_tableA
file a.txt is:
delete from test_$suffix
$a=get-content a.txt
$suffix="tableA"
how to manipulate the variable to set it as
delete from test_tableA
Here's one way. Variables in a double-quoted here-string get substituted automatically. Just be sure your input file conforms to the PS rules for here-strings.
Invoke-Expression is the equivalent.
See http://technet.microsoft.com/en-us/library/ee176880.aspx for more information.