Lost In The Green Shell

Sunday, April 16, 2017

(powershell) Remove line breaks from a file

I needed to remove the newlines from an exported certificate to get the public key.
Nice and simple.


 $result = 'string_with_newlines'' -replace "`t|`n|`r",""
Posted by masino.matc at 8:10 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2020 (1)
    • ►  January (1)
  • ►  2018 (1)
    • ►  October (1)
  • ▼  2017 (1)
    • ▼  April (1)
      • (powershell) Remove line breaks from a file
  • ►  2016 (1)
    • ►  May (1)
  • ►  2015 (11)
    • ►  May (2)
    • ►  April (5)
    • ►  January (4)
None. Watermark theme. Powered by Blogger.