From 9791551a77be8ca1fe4afa882289f69e2043ec7f Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Fri, 17 Feb 2017 10:46:00 -0600 Subject: [PATCH] Added getdst() documentation --- Bashrc.wiki | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Bashrc.wiki b/Bashrc.wiki index 724d8a7..0c2f931 100644 --- a/Bashrc.wiki +++ b/Bashrc.wiki @@ -82,3 +82,22 @@ The alias portion of my [[Weechat]] configuration is set in the .bashrc like so: }}} For more info, see the [[Weechat]] page. + +---- + +==Get Dell Service Tag== + +I work with Dell machines a lot, and when dealing with hardware problems, it's nice to have the service tag handy. Lucky for me, the service tag is easily retrieveable using `dmidecode(1)`, so I made a function for it. + +{{{class="prettyprint" +# Print Dell Service Tag +getdst() { + if [[ "$1" = "-l" ]]; then + printf "http://www.dell.com/support/home/us/en/04/product-support/servicetag/%s\n" "$(getdst)" + else + sudo dmidecode -s system-serial-number + fi +} +}}} + +As an added bonus, the `-l` option will print the url for that product's support page.