Lessons Learned

My drop-site for interesting snippets and tips. If it's useful to you as well, great!

Browse by Tags

Tagged Content List
  • Blog Post: One-Liner: Fun with Multi-line Blocktext and –Split/.Split()

    The title is an oxymoron: I’m going to show a one-liner on how to deal with multi-line blocktext.  To start with, I’m using ‘blocktext’ to mean: $blocktext = @" This is an example using @" .. "@ "@; which is known from Unix-dom as ‘heretext’ and what I simply call...
  • Blog Post: PowerShell One-Liner: Stripping Comments and Blanks

    I know, I know, XML is the new standard. There are still times where flat files are easier. Time is short, and I'm lazy. (I'm also impatient and working on hurbis. Geek-points if you can tell me where that's from.) Anyhow, here's a quick-and-dirty way to strip out comments, whitespace and blank lines...
  • Blog Post: PowerShell for N00bs 3: What's a.k.a. short for?

    "Also known as." It's an abbreviation, a TLA. (What's a TLA short for? "Three Letter Acronymn." See: recursion, definition.) In PowerShell for N00bs 2 , we snuck something in the last example: PSH> (gm -InputObject [string] | where-Object {$_.name -eq 'replace'}).definition System.String...
Page 1 of 1 (3 items)