Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Variables
- $replace='2.55'
- $filepath= 'C:folderpathbond.out'
- #go straight to the line I want to change something in
- $data = Get-Content $filepath | select -skip 38 -first 1
- #split it all, find the other variable and overwrite it
- $split=$data.split("{|}")
- $split[3]=$replace
- #put it all back again
- $join = $split -join "|"
- write-output $join
- #Variables
- $replace='2.55'
- $filepath= 'C:folderpathbond.out'
- #find the variable
- $data = Get-Content $filepath | select-string $bond
- #split it all, find the other variable and overwrite it
- $split=$data.split("{|}")
- $split[3]=$replace
- #put it all back again
- $join = $split -join "|"
- write-output $join
Add Comment
Please, Sign In to add comment