Experimental Physics and Industrial Control System
Title: Re: EPICS database comparison
The script below sorts record definition blocks, but not the
fields within a record. The "record" header must begin
in column 1 and the record's closing bracket must be the last
non-whitespace character on the line.
#!/usr/local/bin/perl
# File: recordSort
# Purpose: Sort an EPICS .db file by record name.
# Usage: recordSort <file>
$name = '!';
$block = '';
while( <>) {
if ( /^record.*"(.*)"/) {
$name = $1;
$block = $_;
}
else {
$block .= $_;
if ( /\}\s*$/) {
$block{ $name} = $block;
undef $block;
}
}
}
foreach $name ( sort keys %block) { print $block{ $name};}
# EOF
- References:
- EPICS database comparison Pam Gurd
- Navigate by Date:
- Prev:
Re: EPICS database comparison Andrew Johnson
- Next:
Reading an array of strings from a Waveform record Simon Hoyle
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: EPICS database comparison Andrew Johnson
- Next:
Reading an array of strings from a Waveform record Simon Hoyle
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025