Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Replace Word

$
0
0

Guys , 

I would like to Replace  word : DWH_SRC_ID           CHAR(4)                        not null title 'Source',  into empty . Can you please share me any commands to do . I tried with below commands it shows error for me any ideas please let me know 

PS Y:\> (Get-Content Y:\ke.txt) | Foreach-Object {$_ -replace 'DWH_SRC_ID           CHAR(4)                        not null title 'Source',', ' '} | Set-Content Y:\ke1.txt
At line:1 char:124
+ ...      CHAR(4)                        not null title 'Source',', ' '} | ...
+                                                         ~~~~~~~~~
Unexpected token 'Source','' in expression or statement.
At line:1 char:133
+ ...     CHAR(4)                        not null title 'Source',', ' '} |  ...
+                                                                 ~
Missing argument in parameter list.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images