1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/usr/bin/awk
#
# getMacInfo.awk
#
# K. Banse ESO - Garching 110714
# 110714 last modif
#
#
BEGIN {
newfile = "mac_system"
IGNORECASE = 0;
}
# look for the system software section
/^Software:/ {
getline; #skip to next line #first blank line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line
print $0 >> newfile
getline; #skip to next line #last blank line
print $0 >> newfile
}
END {
# printf "system info extracted to file mac_system\n";
}
|