Skip to content
Snippets Groups Projects
Select Git revision
  • 418afc9eed4019fd0ce62171b5bfc5149bca6e18
  • master default
2 results

run_tests.py

Blame
  • Forked from finesse / pykat
    Source project has a limited visibility.
    script 575 B
    #! /bin/bash
    
    # This is a script to wrap smartctl output into http:// displayable form
    # It requires a filename as input, and produces an file with a .html extension as output
    
    if [ $# -ne 1 ] ; then
    	echo This script requires one a file as input
    	exit 1
    fi
    
    model=`grep "Device Model"  $1  | awk '{print $3}' `
    
    # see if file name in use
    let i=0
    while [ -f $model-$i.html ] ; do
    	let i+=1
    done
    
    filename=$model-$i
    echo -e "<pre><tt>\n"    > $filename.html
    cat $1                  >> $filename.html
    echo -e "</tt></pre>\n" >> $filename.html
    
    echo created file $filename.html