title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
x
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
|
Monday, January 25, 2021 | |
Can you tell I'm cleaning out open windows on my laptop this morning? Here's a line of PowerShell that uses
PowerShell returns objects, and you have to pull out just the result to write to the file. Otherwise you have tons of cruft in your results like this...
That stinks. The above command removes the file name and line number. Bonus code: How to
UPDATE: Wow, grepping with I wanted to find a string in a single file and put the results into a file. I tried piping the normal way with Why? WHY??!!! (One comment on SO suggests it's b/c "output gets formatted for a certain width of monitor" and even gives a source for that claim. Please heavens no. Why do you take a line and, without any input, turn it into something else? Leave Anyhow, the solution is to add an explicit Here's what I ended up using for my call to write results to
That's... that's not discoverable at all. I mean, it's not impossible to find, but that I can't recall why I stopped using Hope that helps. Labels: grep, noteToSelf, powershell posted by ruffin at 1/25/2021 10:19:00 AM |
|
| |
All posts can be accessed here: Just the last year o' posts: |
||||||||||||||||||||||
|