Last change
on this file since 629 was
474,
checked in by rybkin, 16 years ago
|
See C.L. 375
|
-
Property svn:executable set to
*
|
File size:
580 bytes
|
Line | |
---|
1 | |
---|
2 | #-------------------------------------------------- |
---|
3 | # Procedure to filter system version specifications |
---|
4 | # |
---|
5 | # Input is received from stdin |
---|
6 | # Output wll be sent to stdout |
---|
7 | # |
---|
8 | # Input format |
---|
9 | # <some letters>[-]<dot separated numeric fields> |
---|
10 | # |
---|
11 | # Output format |
---|
12 | # <some letters><field1> |
---|
13 | # |
---|
14 | # o only the first one numeric field is kept |
---|
15 | # o separators ('-' or '.') are all filtered out |
---|
16 | # |
---|
17 | #-------------------------------------------------- |
---|
18 | |
---|
19 | export LC_ALL=C |
---|
20 | exec sed -n ' |
---|
21 | h |
---|
22 | s#[-.0-9]##g |
---|
23 | x |
---|
24 | s#[^-.0-9]##g |
---|
25 | s#^[^0-9]## |
---|
26 | y#-.# # |
---|
27 | s#^\([0-9]*\) *.*#\1# |
---|
28 | G |
---|
29 | s#\(.*\)\n\(.*\)#\2\1#p |
---|
30 | ' |
---|
Note: See
TracBrowser
for help on using the repository browser.