|
I have what I think is a very basic question. For commands that return data tables like this:adaz posted:
How should I be scraping arbitrary data out of it? For instance, if I know I want the last row? Or just the hostname value from the last row? I know how to use | where and match a regex, but I am more interested in how it should be done when the data in the fields isn't known. Edit: finally answered my own question reading about manipulating objects. select-object is what I needed. KS fucked around with this message at 07:11 on Aug 23, 2011 |
# ¿ Aug 23, 2011 06:09 |
|
|
# ¿ Apr 30, 2024 15:37 |
|
adaz posted:There are a lot of different ways of doing it ... Is any of that any help? Thanks so much for the effort you put into this. I found the specific tool I needed and found a toolbox full of other useful things to boot. Another question: I think I have a pretty good grasp on handling errors and building logic into a script to handle failures. However, yesterday I had one script simply hang -- it didn't error out, but one of the cmdlets in the script hung indefinitely. What are the methods for dealing with this mode of failure?
|
# ¿ Sep 6, 2011 18:53 |
|
So I'm a rank beginner at this and I'm embarrassed to post this snip. When a SAN-based snapshot is presented to a different server, it shows up with some flags set on the volumes. I am trying to enumerate those volumes and generate a diskpart script to unset the flags.code:
code:
I know it shouldn't be this hard, and I really want to learn how to do this better (and generalize it for result sets of indeterminate size). I just feel lost without awk and sed.
|
# ¿ Nov 10, 2011 22:50 |