summaryrefslogtreecommitdiff
path: root/smartinfo
diff options
context:
space:
mode:
Diffstat (limited to 'smartinfo')
-rwxr-xr-xsmartinfo4
1 files changed, 2 insertions, 2 deletions
diff --git a/smartinfo b/smartinfo
index 0675b13..95b4c2f 100755
--- a/smartinfo
+++ b/smartinfo
@@ -9,8 +9,8 @@ die() {
}
get_file_name() {
- sn=$(sed -n 's/^Serial Number: \+//p' < "$1")
- dm=$(sed -n 's/^Device Model: \+//p' < "$1")
+ sn=$(sed -n 's/^Serial Number: \+//ip' < "$1")
+ dm=$(sed -n 's/^\(Device Model\|Product\): \+//ip' < "$1")
printf 'smart-%s-%s-%s.txt' "$dm" "$sn" "$(date +%F-%H-%M-%S)" | tr ' ' '_'
}