Last change
on this file since 660 was
465,
checked in by rybkin, 16 years ago
|
See C.L. 366
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
604 bytes
|
Rev | Line | |
---|
[2] | 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><field2> |
---|
| 13 | # |
---|
| 14 | # o only the first two numeric fields are kept |
---|
| 15 | # o separators ('-' or '.') are all filtered out |
---|
| 16 | # |
---|
| 17 | #-------------------------------------------------- |
---|
| 18 | |
---|
[465] | 19 | export LC_ALL=C |
---|
[432] | 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]*\) *\([0-9]*\) *.*#\1\2# |
---|
| 28 | G |
---|
| 29 | s#\(.*\)\n\(.*\)#\2\1#p |
---|
| 30 | ' |
---|
Note: See
TracBrowser
for help on using the repository browser.