Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Mac OSX Terminal – Get Mac Serial Number

Posted on June 17, 2016 By David Kittell

A quick and easy way to get your serial number

# Get Serial Number
sSerialNumber=$(system_profiler SPHardwareDataType |grep "Serial Number (system)" |awk '{print $4}'  | cut -d/ -f1)
echo $sSerialNumber
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Mac OS X Shell Mac OSX UNIX UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

Delete Duplicate Rows

Posted on April 29, 2013October 26, 2015

CREATE TABLE DuplicateRcordTable (Col1 INT, Col2 INT) INSERT INTO DuplicateRcordTable SELECT 1, 1 UNION ALL SELECT 1, 1 –duplicate UNION ALL SELECT 1, 1 –duplicate UNION ALL SELECT 1, 2 UNION ALL SELECT 1, 2 –duplicate UNION ALL SELECT 1, 3 UNION ALL SELECT 1, 4 GO SELECT * FROM…

Read More

Ektron File Extension Asset Inventory

Posted on October 17, 2013October 26, 2015

Following the logic in a previous post, File Extension, this query will list Ektron asset file extensions and count them. SELECT ( CASE WHEN handle LIKE ‘%.%’ THEN reverse(left(reverse(handle), charindex(‘.’, reverse(handle)) – 1)) ELSE ” END ) AS FilePath ,COUNT(*) AS ‘Total Assets’ FROM AssetDataTable GROUP BY ( CASE WHEN…

Read More

UNIX Bash – Create Date/Time File Name

Posted on August 25, 2016October 4, 2019

When you need to create a log file or some dated archive echo "This is a dated file $(date +%Y_%m_%d_%H.%M.%S)" > testfile_`date +%Y_%m_%d_%H.%M.%S`.txt The format can be modified slightly based on date formatting. Originally Posted on August 25, 2016Last Updated on October 4, 2019 All information on this site is…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes