Friday, June 25, 2010

Powershell Functions

CLIP

Very cool. It copies piped input to the clipboard.

Tuesday, June 1, 2010

Computer languages

I tend to use the following on a monthly basis:
C#
VB
Powershell
F#
Javascript - JQuery
AutoHotKey
Android (Java)
Regular Expressions

Some of them I use daily (VB, C#).
Weekly (Powershell, Javascript - JQuery, F#)
Monthly (Android, Regular Expressions).

I find it interesting, just looking over the list and noting the vast differences in their purposes and their syntax,
even in the tools used to write them. That is by no means an exhaustive list of the computer languages which I know and have worked with, but it is the list of the languages that I am still learning and growing more proficient in.

More powershell

Here's what I wrote today:


1. Get-Item count.txt | Get-Content | Measure-Object -Line | Select-Object -ExpandProperty Lines
2. Get-Item count.txt | Get-Content | Select-String -Pattern "ThatObject\.Load\(\)" | Measure-Object -Line

In one, note the -ExpandProperty option. This returns an integer rather than a powershell object containing an integer.

In two, note the use of a regular expression.

Regular expressions are cool in general, but my regular expression skills and my powershell skills suffer from the same problem, and that is that I tend to use them rarely. But they're very useful when I do use them. When I get to combine the two, that's just a bonus.