Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/support truenas scale #37

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Trying to fix sed command
  • Loading branch information
Jérôme Guidon committed Aug 3, 2024
commit 460d92b2852d58f160b6ff7ca49c39b0778ed781
18 changes: 12 additions & 6 deletions report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,18 @@ for drive in $drives; do
) >> "$logfile"
done
# Remove some un-needed junk from the output
sed -i '' -e '/smartctl 6.3/d' "$logfile"
sed -i '' -e '/Copyright/d' "$logfile"
sed -i '' -e '/=== START OF READ/d' "$logfile"
sed -i '' -e '/SMART Attributes Data/d' "$logfile"
sed -i '' -e '/Vendor Specific SMART/d' "$logfile"
sed -i '' -e '/SMART Error Log Version/d' "$logfile"
#sed -i '' -e '/smartctl 6.3/d' "$logfile"
#sed -i '' -e '/Copyright/d' "$logfile"
#sed -i '' -e '/=== START OF READ/d' "$logfile"
#sed -i '' -e '/SMART Attributes Data/d' "$logfile"
#sed -i '' -e '/Vendor Specific SMART/d' "$logfile"
#sed -i '' -e '/SMART Error Log Version/d' "$logfile"
delete_text_from_file "smartctl 6.3" "$logfile"
delete_text_from_file "Copyright" "$logfile"
delete_text_from_file "=== START OF READ" "$logfile"
delete_text_from_file "SMART Attributes Data" "$logfile"
delete_text_from_file "Vendor Specific SMART" "$logfile"
delete_text_from_file "SMART Error Log Version" "$logfile"

### End details section, close MIME section
(
Expand Down
2 changes: 2 additions & 0 deletions system-specific-aliases
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
alias md5="md5sum"
alias sha256="sha256sum"
alias parseDate="date -d"
alias delete_text_from_file="sed -i '/$1/d' $2"
else
alias list_drives="sysctl -n kern.disks"
alias parseDate="date -f \"%e %b %Y %H:%M:%S\""
alias delete_text_from_file="sed -i '' -e '/$1/d' $2"
fi