Hey all, Im trying to write a script on windows, which Im not too familiar with. Im generally a bash scripting guy but am using perl for this case.
My question is...
I have this exact output:
2 Dir(s) 6,380,429,312 bytes free
and I just need to get the number out of that line. So, in unix I would just use `awk '{print $3}' filename.txt` but thats not an option in this case... is see many one line examples for perl, but none work which I assume is due to the whitepaces. and ontop of that I cant figure out how to take those one line statements and put them into a script
here is all I have got so far (its not much :o ).
$dirinfo = `dir | find "bytes free"`;
open diskinfo, ">diskinfo.txt";
print diskinfo $dirinfo;
close diskinfo;