File: getMacInfo.awk

package info (click to toggle)
eso-midas 15.09pl1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 146,960 kB
  • ctags: 55,836
  • sloc: ansic: 360,661; sh: 7,357; makefile: 6,229; pascal: 535; perl: 40; awk: 36; sed: 14
file content (51 lines) | stat: -rw-r--r-- 1,152 bytes parent folder | download | duplicates (7)
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";
}