RosettaCodeData/Task/Take-notes-on-the-command-line/PowerShell/take-notes-on-the-command-line.psh

10 lines
202 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
$notes = "notes.txt"
if (($args).length -eq 0) {
if(Test-Path $notes) {
Get-Content $notes
}
} else {
Get-Date | Add-Content $notes
"`t" + $args -join " " | Add-Content $notes
}