Horje
get last line from string powershell Code Example
get last line from string powershell
(gc "c:\myfile.txt") | % -Begin {$test = (gc "c:\myfile.txt" | select -first 1 -last 1)} -Process {if ( $_ -eq $test[0] -or $_ -eq $test[-1] ) { $_ -replace "-" } else { $_ }} | Set-Content "c:\myfile.txt"




Shell

Related
vscode manually install extension Code Example vscode manually install extension Code Example
git --version git version 2.7.0 (Apple Git-66) Code Example git --version git version 2.7.0 (Apple Git-66) Code Example
help You are using pip version 8.1.1, however version 21.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Code Example help You are using pip version 8.1.1, however version 21.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Code Example
how to copy zip file from remote to local Code Example how to copy zip file from remote to local Code Example
magick change format png Code Example magick change format png Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8