Otto,
I extracted the following code from a shell script that I use to find all
C:B's referenced in Foxview files. I found that Foxview files store C:B
and C:B.P as text strings. Therefore, the "strings" command will extract
them intact. I wrote this several years ago and still use it regularly.
It seems like I tried using "dedit" but found that the "strings" command
gave me all the information I needed just much faster. I just used this
script on an H90 to parse over 1400 Foxview files located in 21 different
locations. It completed in about 2 minutes.
This script uses the input file (search_path.txt) which contains a list of
file paths to the Foxview ".fdf" files I want searched. The output file
"fdfByCmpBlk.lst" contains a comma-separated listing sorted by C:B of
every C:B referenced by every fdf file containing those references. The
first field in this file is C:B and the second field is the full file name
of the fdf file.
Hopefully, the following code doesn't get butchered too badly passing
through the freelist email engine.
#######################################################################################
sourcefiles=search_path.txt
outfileýfByCmpBlk.lst
awkoutput=awkoutput.txt
if [ -e $awkoutput ]
then
rm $awkoutput
fi
# Loop through every path listed
for disppath in `cat $sourcefiles | grep ^[^#]`
do
cd $disppath
# Loop through every .fdf file in the current folder being searched
for file in `ls *.fdf`
do
path=$disppath$file
# Utilize awk program to extract only patterns matching a minimum
3-character CMP followed by BLK
# without parameter. This covers FoxDraw "Action" assignments and setting
parameters.
# NOTE: As of 08/05/2010 no CMP name was less than 3
characters long.
# Append to this list every string containing a leading " " or "="
followed by CMP:BLK(space) from .fdf file
strings $path | awk '
{match($0,pattern"\ ")
if (RSTART != 0) print substr($0,RSTART,RLENGTH-1)","path
match($0,pattern"\.")
if (RSTART != 0) print substr($0,RSTART,RLENGTH-1)","path
}' pattern=[A-Z0-9_]{3,12}:[A-Z0-9_]{1,12} path=$path >>
$awkoutput
done
done
# Sort and Remove Duplicates
sort $awkoutput | uniq > $outfile
#######################################################################################
Doyle Bean
Process Control Engineer
Huntsman Corporation
409-724-4485
From: "QUEIROLO, IGNACIO ESTEBAN" <ignacio.queirolo@xxxxxxx>
To: "foxboro@xxxxxxxxxxxxx" <foxboro@xxxxxxxxxxxxx>,
Date: 04/12/2017 06:39 AM
Subject: Re: [foxboro] Parsing dedit output
Sent by: foxboro-bounce@xxxxxxxxxxxxx
Hi Otto,
I am using dedit in a Display Manager interface to make a connection list
to be used later in a project that involve migrating all the displays and
overlays to FoxView/FoxDraw. Because all displays will be re-engineered
with the new design specification according to the best practices (e.g.:
ASM Consortium), they are not converted from DM, they are drawing from
scratch and the report that I am trying to do will be used to checked all
the connections in the new displays.
The command that I am using to make the report is:
/usr/fox/wp/bin/tools/d_edit -l <display_name>
The problem is that dedit output file has each line truncated to 74 width
characters and if have more than that, it split them into two lines and
this is not good for us because we want to import all the lines into a
database to build our own displays and overlays connection list.
-----Mensaje original-----
De: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] En ;
nombre de Otto Kubbenga
Enviado el: jueves, 06 de abril de 2017 12:17 p.m.
Para: foxboro@xxxxxxxxxxxxx
Asunto: Re: [foxboro] Parsing dedit output
Hi Estaban,
I don't understand why you do care that the report output is on two lines?
Please explain.
Anyhow, what this is probably a report (-R or -r) output. You may try to
make a list (-l option).
If you want to edit the connections, you may try to make a dump file
(-dump option), make your edits with a text editor and then upload it.
Best regards / Met vriendelijke groet
_______________________________________________________________________________
Otto Kubbenga
Schneider Electric
The Netherlands
-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] ;
On Behalf Of QUEIROLO, IGNACIO ESTEBAN
Sent: Thursday, 06 April, 2017 16:52
To: foxboro@xxxxxxxxxxxxx
Subject: [foxboro] Parsing dedit output
Unix Folks,
I have the following line from an output of the dedit command:
170 RECT 68,5% Execute 0
ov_conn -cb MOLEX:67TC068. -file /opt/cie/gov/ov_pid 1 -sticky
And I need this:
170 RECT 68,5% Execute 0 ov_conn -cb MOLEX:67TC068.
-file /opt/cie/gov/ov_pid 1 -sticky
How can I append or combine two lines where dedit splited them into two?
Thanks
AVISO LEGAL: Este mensaje y cualquier archivo anexo al mismo son privados
y confidenciales y está dirigido únicamente a su destinatario. Si usted no
es el destinatario original de este mensaje y por este medio pudo acceder
a dicha información por favor elimine el mismo. La distribución o copia de
este mensaje está estrictamente prohibida. Esta comunicación es sólo para
propósitos de información y no debe ser considerada como propuesta,
aceptación, tratativas contractuales, contrato preliminar ni como una
declaración de voluntad oficial por parte de YPF S.A. y/o subsidiarias y/o
afiliadas y no genera responsabilidad precontractual ni contractual alguna
por su contenido y/o sus adjuntos. La transmisión de estos mensajes a
través de mensajería corporativa no garantiza que el correo electrónico
sea seguro o libre de error. Por consiguiente, no manifestamos que esta
información sea completa o precisa. Toda información está sujeta a
alterarse sin previo aviso. LEGAL NOTIC
E: The contents of this message and any attachments are private and
confidential and are intended for the recipient only. If you are not the
intended recipient of this message and through this message you had access
to this information, please delete it. The distribution or copying of this
message is strictly prohibited. This communication is for information
purposes only. It shall not be regarded as a proposal, acceptance,
contract negotiation, preliminary contract or official statement of will
by YPF S.A. and/or its subsidiaries and/or affiliates, and shall not
create any precontractual or contractual liability whatsoever with regard
to its contents and/or attachments. Email transmission cannot be
guaranteed to be secure or error-free. Therefore, we do not represent that
this information is complete or accurate. All information is subject to
change without prior notice.
_________________________________________________________________________
This mailing list is neither sponsored nor endorsed by Schneider Electric
(formerly The Foxboro Company). Use the info you obtain here at your own
risks. See the disclaimer at www.thecassandraproject.org/disclaimer.html
foxboro mailing list:
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.freelists.org_list_foxboro&d=DwIDaQ&c=XEmjTyjfAPcP2RtAp-6FGA&r=OMW882idu4GLJ6W-pw7p9SCSihGCpXsggSRIXN_H8wo&m=4sAwtFV1SlmpFrNoGSewRmkd_8QxzYQwEGQTKFlqifo&síoWQLlmO8vHvPnjO7tzlaxOI8184rycO0IrBDJc1go&e=
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
______________________________________________________________________
*** Confidentiality Notice: This e-mail, including any associated or
attached files, is intended solely for the individual or entity to which
it is addressed. This e-mail is confidential and may well also be legally
privileged. If you have received it in error, you are on notice of its
status. Please notify the sender immediately by reply e-mail and then
delete this message from your system. Please do not copy it or use it for
any purposes, or disclose its contents to any other person.
_________________________________________________________________________
This mailing list is neither sponsored nor endorsed by Schneider Electric
(formerly The Foxboro Company). Use the info you obtain here at your own
risks. See the disclaimer at www.thecassandraproject.org/disclaimer.html
foxboro mailing list:
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.freelists.org_list_foxboro&d=DwIDaQ&c=XEmjTyjfAPcP2RtAp-6FGA&r=OMW882idu4GLJ6W-pw7p9SCSihGCpXsggSRIXN_H8wo&m=4sAwtFV1SlmpFrNoGSewRmkd_8QxzYQwEGQTKFlqifo&síoWQLlmO8vHvPnjO7tzlaxOI8184rycO0IrBDJc1go&e=
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
AVISO LEGAL: Este mensaje y cualquier archivo anexo al mismo son privados
y confidenciales y está dirigido únicamente a su destinatario. Si usted no
es el destinatario original de este mensaje y por este medio pudo acceder
a dicha información por favor elimine el mismo. La distribución o copia de
este mensaje está estrictamente prohibida. Esta comunicación es sólo para
propósitos de información y no debe ser considerada como propuesta,
aceptación, tratativas contractuales, contrato preliminar ni como una
declaración de voluntad oficial por parte de YPF S.A. y/o subsidiarias y/o
afiliadas y no genera responsabilidad precontractual ni contractual alguna
por su contenido y/o sus adjuntos. La transmisión de estos mensajes a
través de mensajería corporativa no garantiza que el correo electrónico
sea seguro o libre de error. Por consiguiente, no manifestamos que esta
información sea completa o precisa. Toda información está sujeta a
alterarse sin previo aviso. LEGAL NOTIC
E: The contents of this message and any attachments are private and
confidential and are intended for the recipient only. If you are not the
intended recipient of this message and through this message you had access
to this information, please delete it. The distribution or copying of this
message is strictly prohibited. This communication is for information
purposes only. It shall not be regarded as a proposal, acceptance,
contract negotiation, preliminary contract or official statement of will
by YPF S.A. and/or its subsidiaries and/or affiliates, and shall not
create any precontractual or contractual liability whatsoever with regard
to its contents and/or attachments. Email transmission cannot be
guaranteed to be secure or error-free. Therefore, we do not represent that
this information is complete or accurate. All information is subject to
change without prior notice.
_________________________________________________________________________
This mailing list is neither sponsored nor endorsed by Schneider Electric
(formerly The Foxboro Company). Use the info you obtain here at your own
risks. See the disclaimer at www.thecassandraproject.org/disclaimer.html
foxboro mailing list:
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.freelists.org_list_foxboro&d=DwIDaQ&c=XEmjTyjfAPcP2RtAp-6FGA&r=OMW882idu4GLJ6W-pw7p9SCSihGCpXsggSRIXN_H8wo&m=4sAwtFV1SlmpFrNoGSewRmkd_8QxzYQwEGQTKFlqifo&síoWQLlmO8vHvPnjO7tzlaxOI8184rycO0IrBDJc1go&e=
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
_________________________________________________________________________
This mailing list is neither sponsored nor endorsed by Schneider Electric
(formerly The Foxboro Company). Use the info you obtain here at your own
risks. See the disclaimer at www.thecassandraproject.org/disclaimer.html
foxboro mailing list: //www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave