From 754856e667b2db080f29dc0dc974c682625a78c9 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 11 Dec 2024 11:44:52 +0100 Subject: [PATCH] Updated list-earthquakes.ps1 --- scripts/list-earthquakes.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/list-earthquakes.ps1 b/scripts/list-earthquakes.ps1 index 45e107ad..274ff01f 100755 --- a/scripts/list-earthquakes.ps1 +++ b/scripts/list-earthquakes.ps1 @@ -8,7 +8,7 @@ .EXAMPLE PS> ./list-earthquakes.ps1 - Mag Location Depth Time UTC + MAG LOCATION DEPTH TIME UTC --- -------- ----- -------- 7.2 98 km S of Sand Point, Alaska 33 km 2023-07-16T06:48:22.606Z ... @@ -30,13 +30,13 @@ function ListEarthquakes { foreach($quake in $quakes) { [int]$depth = $quake.depth - New-Object PSObject -Property @{ Mag=$quake.mag; Depth="$depth km"; Location=$quake.place; 'Time UTC'=$quake.time } + New-Object PSObject -Property @{ MAG=$quake.mag; DEPTH="$depth km"; LOCATION=$quake.place; 'TIME UTC'=$quake.time } } } try { - ListEarthquakes | Format-Table -property @{e='Mag';width=5},@{e='Location';width=42},@{e='Depth';width=12},'Time UTC' + ListEarthquakes | Format-Table -property @{e='MAG';width=5},@{e='LOCATION';width=50},@{e='DEPTH';width=8},'TIME UTC' exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"