Microsoft
Software
Hardware
Network
Question : PowerShell string += question
Ok, so this is probably a simple one, but I have been staring at it for too long.
I am comparing 2 text files and want to put the differences into a string, This works fine, but leaves me with a pesky blank line at the end.
Compare-Object (GC .\remote.txt) (GC .\complete.txt) | %{$strFilesToDownload += "$($_.InputObject)`n"}
Is there a way to avoid this without parsing out the new line after this? For an array I would typically check if it was the last item, but this is not the case here. Thank you for any information / hints.
Answer : PowerShell string += question
One quick way would be to use something like this:
SELECT * FROM mytable WHERE PATINDEX('%[^[ a-z0-9!@#$%^&*()-_=+]%' ,myfield) > 0
You might have to add more characters to this, but this is just a quick example.
Random Solutions
dateDiff - combining a date selection and a time selection
task for mac developer
Error installing sql express upgrade
Adding and removing series for an Excel graph using VBA
Imaging a RAID Setup to a Non-RAID Disk
Windows 2003 DC, want to install DNS but setup fails on missing file(s). (dnsperf.h)
Installing SSL certifcate on exchange 2010
Unable to access OWA
Is there a DSMOD query to change the domain part (only) of an email address in AD?
asp.net mssql - I have a dataosource that initially searches and pulls in a full query is there a way to alter the dynamiccaly the where clause.