Sponsored Content
Top Forums Shell Programming and Scripting Listing strings from file using awr Linux Red Hat Post 303000045 by carlino70 on Monday 3rd of July 2017 11:17:09 AM
Old 07-03-2017
Wrench Listing strings from file using awr Linux Red Hat

Hi experts, I have a file "salida_test" containing (in repetitive way):

Code:
Point ID   1.750251
 Point Name >BRI_4L_SA2__INT Interruptor 33kV Parque Industrial              <
 value 2
 Time of last value update   (ascii): >03/07/17 11:11:14.596 ART<
 TLQ   0000000c00004000
 station #79    abbr: >BRI         <  full: >E.T. BRIGADIER LOPEZ            <

 Point ID   1.140147
 Point Name >RUF_5BC1____INT Int. Banco Cap. 1 13.2kV                        <
 value 2
 Time of last value update   (ascii): >03/07/17 10:27:58.495 ART<
 TLQ   0000000c00800000
 station #18    abbr: >RUF         <  full: >E.T. RUFINO                     <

I need extract just the lines, in this format:

Code:
Point ID   1.750251  value 2    --> in the same line
Point ID   1.140147  value 2    --> in the same line

and then, filtering again:

Code:
750251 2
140147 2

I have a partial filter, but I canīt to obtain the solution:

Code:
awk '(/Point ID/ || /hi/)' salida_test

shows:

Code:
 Point ID   1.750251
 Point ID   1.140147

Code:
awk '(/value/ || /hi/) && !/Time of last value/' salida_test

shows:
Code:
 value 2
 value 2

Could you give me a posible resolution.
Thanks in advanced
Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Red Hat Linux 6.0

Ok here is my problem i do not know the command to load a driver for my network card in Ted hat linux 6.0 could sombody give me a hand. and if there is anyone that has a list of commands for red hat that would be great also (2 Replies)
Discussion started by: bbutler3295
2 Replies

2. UNIX for Dummies Questions & Answers

Slackware's Linux 3.0 VS Red Hat Linux 7.x

Hello guys, I got overzealous (I Think). I got the book Linux Unleashed that comes with the Slackware 3.0 Version of Linux for $2.00.I also have Red Hat Linux 7.2 (No book, just the OS).What I wanted to know was,other than the bells and whistles of Red Hat is there any significant difference... (2 Replies)
Discussion started by: perrylx
2 Replies

3. UNIX for Dummies Questions & Answers

XP to Linux (Red Hat)

I have a PC running XP, and I have a PC that dual boots W2K and Red Hat Linux 7.3. I have the two connected via crossover cable, and the two can access each other when both are running windows. If I were to boot up Linux, can my XP PC telnet to the Linux PC? Any pointers or websites to... (3 Replies)
Discussion started by: lawadm1
3 Replies

4. Linux

Red Hat Linux 9

Hello there! Will anybody please tell me some good links to online eBooks on Red Hat Linux 9 user experiences and the like. If the books are in PDF Format, it will be nice to read. Thanks for cooperation in advance. Enjoy using open source and breathe freely! JAM (5 Replies)
Discussion started by: Jawwad
5 Replies

5. Red Hat

Red Hat Linux document

Hi Friends, I am working in new platform I need the document for Red hat Linux. Anybody have pls share with me. Regards, Thangadurai M (2 Replies)
Discussion started by: thangadurai
2 Replies

6. Homework & Coursework Questions

File transfer from Red Hat Linux to Windows 7

My assignment is to use C++ to generate a table of values for the U.S. standard atmosphere, when data at sea level are given, which i have done perfectly. Now, i am attempting to create a matlab script to read and plot the data. I forgot to put my table of data on my thumb drive yesterday, and... (4 Replies)
Discussion started by: ds7202
4 Replies

7. UNIX for Dummies Questions & Answers

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ?

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ? (2 Replies)
Discussion started by: ahmedamer12
2 Replies

8. Shell Programming and Scripting

Directory / File changes on CIFS share mounted on Red Hat Linux

I have a requirement to copy the changed file on CIFS share mounted on Red Hat Linux to a remote FTP/SFTP server. I tried inotify-tools, but this didn't track the modified files. Has anyone tried incron or any other suggestion? (1 Reply)
Discussion started by: SupeAlok
1 Replies

9. Fedora

Which is the better platform to learn UNIX/Linux (Kali Linux Vs. Red Hat or other)?

I just started a new semester and I started my UNIX class yesterday. I've already decided to use python along with my learning process but what I really want to use with it is Kali as my UNIX/Linux platform to learn off of since I already wanted to learn Cyber Sec. anyways. I just wanted to know if... (12 Replies)
Discussion started by: ApacheOmega
12 Replies

10. Red Hat

Converting fixed width file to pipe delimiter in Linux(red-hat)

Hi, I am facing a typical scenario for AWK command . In HP- UNIX is behave as expected but in red hat linux same awk code is not give the same result. The below code is for convert the fixed width file to pipe delimiter file in HP-unix server. awk code: #!/bin/awk -f NR!=1... (11 Replies)
Discussion started by: brij_abhi
11 Replies
ap-trapd(8)						      System Manager's Manual						       ap-trapd(8)

NAME
ap-trapd - a SNMP trap processing daemon SYNOPSIS
ap-trapd [ -i device ] [-u user ] [-s] DESCRIPTION
ap-trapd It's a SNMP trap processing daemon that accepts traps, parse them and store useful data using syslog, at logging LEVEL0. Specify device to listen for SNMP traps on the particular device (this option only works at Linux). To be running by user different from nobody you may specify user. To correct work with Smartbridges APs specify -s key (they use specific traps). Utility added to ap-utils from version 0.8. SYSLOG
To store traps to own log file you may add next string to your /etc/syslog.conf local0.* /var/log/ap-traps.log After doing it, just restart syslogd with command like killall -HUP syslogd TRAPS
When a trap is received, a message will be logged indicating that an action happened to the Access Point such as: Trap Reassociation: This trap message is sent when a Station reassociation request is received from Access Point. Trap Association: Indicates the reception of an association request packet and the sender Station's successful association with the Access Point. Trap Disassociation: This trap message is sent when a disassociation notification packet is received from a Station. Trap Reset: This trap message is sent when Access Point Resets. Trap Setting IP Address with Ping: This trap message is sent when the Access Point IP address is set with the transmission of a ping message. Trap Start Up: This trap message is sent when the Access Point Starts Up. Trap Failed To Erase Flash: This trap message is sent when Access Point Failed To Erase Flash. APClientScanning Access Point Client is scanning... APClientAuthenticating Access Point Client is authenticating with the AP. APClientAssociating Access Point Client is associating with the AP. APClientReAssociating Access Point Client is reassociating with the AP. APClientAuthenticationFailed Access Point Client has failed authenticating with the AP. APClientAssociationFailed Access Point Client has failed associating with the AP. APClientConnected Access Point Client has been connected with the AP. APClientDisconnected Access Point Client has been disconnected from the AP. APClientScanFailed Access Point Client has failed scanning! APClientJoinFailed Access Point Client has failed joining! APClientJoining Access Point Client is in join state. Smartbridges specific TRAPS MultiAttachedStation Multiple attached stations in the ethernet size SECURITY Utility ap-trapd must be running by 'root', after opening port utility change owner to 'nobody', so this user must exist in you sys- tem. You may set user using -u option as described below for change default unprivileged user. AUTHOR
Roman Festchook <roma@polesye.net> http://ap-utils.polesye.net SEE ALSO
ap-config(8), ap-mrtg(8), syslogd(8) Wireless Access Point Utilities for Unix ap-trapd(8)
All times are GMT -4. The time now is 02:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy