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.