Added getdst() documentation
This commit is contained in:
parent
34c76d15ad
commit
9791551a77
19
Bashrc.wiki
19
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.
|
||||
|
|
Loading…
Reference in New Issue