1451
General Software Discussion / Re: Extract REGEX matches from multiple text files
« Last post by wraith808 on August 24, 2018, 03:14 PM »Cleaned up the thread as requested.
The amusing Black Mirror video above, though artificial, is arguably a prescient comment on the implicit risks inherent in a tendency for "oversharing" and/or "data leakage" in the IT-enabled SNM (Social Network Marketplace) and other personal-data-related databases (e.g., health, insurance, banking, education), where private data that one might have previously perceived as being peculiar and useful/relevant in one context only is subsequently seen to be useful/relevant in another, or maybe many other contexts. These are typically the data connections and interconnections that the SNM operators and data miners would tend to seek/exploit, for financial gain.
When I was contracted in 2003 to get a failed data analysis project back on the rails, I learned quite a lot. It was a complex IT project to implement a BI (Business Intelligence) system and we had to train the users in the application of BI (it's actually quite powerful and hairy stuff) to meet the growing and complex business needs of the power (energy) company who had contracted me into the project recovery role. I learned that what the Defence sector had always taught was true - that all data/information can be interconnected at some stage - and that, for BI, the world could be simply envisaged as one or more universes of dynamic data - each having its own peculiar descriptive and dynamic data model and that, as in the popular SF concept of parallel universes, there was the potential to interlink these data universes (mass aggregations of dynamic data sets), constantly combining/recombining and drawing data from one to the other, enabling the BI analyst to discover data relationships in a way that would probably not have previously been feasible on such a mass scale, using the then prevailing technologies.
Fast forward to 2018, where we can perhaps now better understand why we might have the apparent privacy shambles that we see around us. It was a gold-rush, opportunistic, every man for himself. Presumably the Google/Facebook founders (and others) would have seen it coming. There were little/no regulations to limit or constrain the progress of BI and its application in the field of mass demographics. Now that some regulations have belatedly been or are being implemented, it arguably may be too late anyway - locking the stable door after the horse has bolted; Pandora's box has already been been opened.-IainB (August 22, 2018, 04:45 AM)
Thanks, but it needs me to run it as admin, which I cannot.-kalos (August 21, 2018, 09:42 AM)
And it's taken 4 pages to find that out - something that should have been stated earlier.Any idea why the below does not work?
(gc *.xml) -match '(?s)<\?xml\ version="1\.0"\ encoding="UTF-8"\?>.+?</dbts:PmryObj>'
Sure.
Q: Whats's the input data?
A: We don't know.
Q: What's the command output?
A: We don't know.
Q: What version of Powershell are you using?
A: We don't know.
Q: What OS are you using, (including architecture)?
A: We don't know.
Q: What's the statistics of the input file, (eg. size)?
A: We don't know.
Q: Why the hell are you trying to process all files at once instead of one at a time?
A: We don't know.
etc, etc, etc, etc ... for 4 pages.
Idea: We don't know.
Why: See point 1 here.-4wd (August 22, 2018, 06:30 AM)
Thanks, but it needs me to run it as admin, which I cannot.-kalos (August 21, 2018, 09:42 AM)
TOPIC
about_Logical_Operators
SHORT DESCRIPTION
Describes the operators that connect statements in Windows PowerShell.
LONG DESCRIPTION
The Windows PowerShell logical operators connect expressions and
statements, allowing you to use a single expression to test for multiple
conditions.
For example, the following statement uses the and operator and
the or operator to connect three conditional statements. The statement is
true only when the value of $a is greater than the value of $b, and
either $a or $b is less than 20.
($a -gt $b) -and (($a -lt 20) -or ($b -lt 20))
Windows PowerShell supports the following logical operators.
Operator Description Example
-------- ------------------------------ ------------------------
-and Logical and. TRUE only when (1 -eq 1) -and (1 -eq 2)
both statements are TRUE. False
-or Logical or. TRUE when either (1 -eq 1) -or (1 -eq 2)
or both statements are TRUE. True
-xor Logical exclusive or. TRUE (1 -eq 1) -xor (2 -eq 2)
only when one of the statements False
is TRUE and the other is FALSE.
-not Logical not. Negates the -not (1 -eq 1)
statement that follows it. False
! Logical not. Negates the !(1 -eq 1)
statement that follows it. False
(Same as -not)
Note: The previous examples also use the equal to comparison
operator (-eq). For more information, see about_Comparison_Operators.
The examples also use the Boolean values of integers. The integer 0
has a value of FALSE. All other integers have a value of TRUE.
The syntax of the logical operators is as follows:
<statement> {-AND | -OR | -XOR} <statement>
{! | -NOT} <statement>
Statements that use the logical operators return Boolean (TRUE or FALSE)
values.
The Windows PowerShell logical operators evaluate only the statements
required to determine the truth value of the statement. If the left operand
in a statement that contains the and operator is FALSE, the right operand
is not evaluated. If the left operand in a statement that contains
the or statement is TRUE, the right operand is not evaluated. As a result,
you can use these statements in the same way that you would use
the If statement.
SEE ALSO
about_Operators
Compare-Object
about_Comparison_operators
about_If
but I cannot see in the list of operators the OR-kalos (August 21, 2018, 04:02 AM)Code: PowerShell [Select]
Get-Help about_Logical_Operators-4wd (August 21, 2018, 07:49 AM)
I did that, but I get this:PS H:\> Get-Help about_Logical_Operators
Get-Help : Get-Help could not find about_Logical_Operators in a help file in this session. To download updated help
topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at
http://go.microsoft.com/fwlink/?LinkID=107116.
At line:1 char:1
+ Get-Help about_Logical_Operators
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand-kalos (August 21, 2018, 08:31 AM)
The first is the Powder Mage Series, by Brian McClellan. It starts with A Promise of BloodThe Age of Kings is dead . . . and I have killed it.
It's a bloody business overthrowing a king...
Field Marshal Tamas' coup against his king sent corrupt aristocrats to the guillotine and brought bread to the starving. But it also provoked war with the Nine Nations, internal attacks by royalist fanatics, and the greedy to scramble for money and power by Tamas's supposed allies: the Church, workers unions, and mercenary forces.
It's brilliantly paced, with visceral battle scenes that other than the presence of the Powder Mages and other Magic are very well done, and might as well be right out of a Sharpe novel, and well written characters that are intelligently developed.-wraith808 (August 12, 2016, 09:16 AM)
They only bought it for one reason. To have access to all of that code whenever they please.-dmd7978 (August 19, 2018, 02:44 PM)
This is FUD and nothing else.-Tuxman (August 19, 2018, 02:47 PM)
Please show your appreciation for this app and support its development by donating at https://www.donationcoder.com/Donate"
Asking for donations to support out work is forbidden. We can charge for the app, but we are not allowed to ask people who like our work to consider making a donation to our website.
-mouser (August 14, 2018, 05:03 PM)
That sucks. What I have seen others do is create a second app which is just a paid Donate app which does nothing (assume that is still allowed). That doesn't really steer people to the site, but it's something.-daddydave (August 18, 2018, 06:38 AM)