Sponsored Content
Full Discussion: Filter a particular string
Top Forums UNIX for Dummies Questions & Answers Filter a particular string Post 302650657 by vanand420 on Monday 4th of June 2012 04:39:43 AM
Old 06-04-2012
Quote:
Originally Posted by jayan_jay
Based on the input given ..
Code:
$ nawk '/APC=4-033-0/{print $5,$6,$7,x};{x=$3" "$4}' infile
OPC=4-003-7 APC=4-033-0 inaccessible 12-05-27 23:15:56

Thanks!!! Smilie It works Fine..But getting blank lines in between output. How to suppress them.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

filter the string from a file ??

I have a file in which there are strings given below: inode 1138932c(mqsiadm) inode 1257904c(mqsiadm) I want to get the nos. only form these. The o/p should be 1138932 1257904 How to filter this out ?? (11 Replies)
Discussion started by: varungupta
11 Replies

2. Shell Programming and Scripting

Filter some text

Dear experts, Below i have mentioned two alarms with MAJOR severity, i am intrested only with alarm contains text tre , actually i want to filter out alarm which is highlighted in bold text in some other file for further processing. I need all above three line of the alarm containing text tre... (3 Replies)
Discussion started by: Danish Shakil
3 Replies

3. Shell Programming and Scripting

Sed filter words from string

I have following string in a variable: str="sstring garbage adfsdf tab.col1 lkad rjfj tab2.col2 adja tab2.col4 garbage" I want to filter "word.word" pattern from it. I assume the pattern won't occur in start or end of the string. Output shoud be: tab.col1 tab2.col2 tab2.col4 Can this be... (7 Replies)
Discussion started by: amicon007
7 Replies

4. Shell Programming and Scripting

How to filter

Hi I have a file containing the below lines 1010001001639 1010001001789 1020001001927 1030001001928 1040001002033 1200001002609 1200001003481 1200001004935 I need to filter lines that starts with 101. It would be of great help if its in awk. (6 Replies)
Discussion started by: Naga06
6 Replies

5. Shell Programming and Scripting

to extract string from main string and string comparison

continuing from my previous post, whose link is given below as a reference https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569 consider there is create table commands in a file for eg: CREATE TABLE `Blahblahblah` ( `id` int(11) NOT NULL... (2 Replies)
Discussion started by: vivek d r
2 Replies

6. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

7. Shell Programming and Scripting

Perl script to filter the string

Hi folks, I have a log file with the lines in the below format. Jul 1 23:00:51 10.212.3.251 SS: %SYS-7-CLI_SCHEDULE: some error occured I want to split the line based on the " %SYS-7-CLI_SCHEDULE: " value. The criteria is the should store the word that starts with % i.e., ... (1 Reply)
Discussion started by: scriptscript
1 Replies

8. Shell Programming and Scripting

Shell Script (ksh) - SQLPlus query filter using a string variable

Using ksh, I am using SQLPlus to execute a query with a filter using a string variable. REPO_DB=DEV1 FOLDER_NM='U_nmalencia' FOLDER_CHECK=$(sqlplus -s /nolog <<EOF CONNECT user/pswd_select@${REPO_DB} set echo off heading off feedback off select subj_name from subject where... (5 Replies)
Discussion started by: nkm0brm
5 Replies

9. UNIX for Dummies Questions & Answers

Filter records in a huge text file from a filter text file

Hi Folks, I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file. bash scripting is what i need. Data.txt Name OrderID Quantity Sam 123 300 Jay 342 498 Kev 78 2500 Sam 420 50 Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies

10. Shell Programming and Scripting

Need to filter string between specific string in ksh

My argument has data as below. 10.9.9.85 -rwxr-xr-x user1 2019-10-15 17:40 /app/scripts/testingscr5.scr 127869538 -rwxr-xr-x user1 2019-10-15 17:40 /app/scripts/testingscr56scr 127869538 ....... (note all these between lines will start with hyphen '-' ) -rwxr-xr-x user1 2019-10-15 17:40... (3 Replies)
Discussion started by: mohtashims
3 Replies
powernet(8)						      Network UPS Tools (NUT)						       powernet(8)

NAME
powernet - Driver for APC SNMP UPS equiment NOTE
This man page only documents the hardware-specific features of the powernet driver. For information about the core driver, see nutups- drv(8). SUPPORTED HARDWARE
APC AP9606 APC Web/SNMP management card, perhaps others EXTRA ARGUMENTS
This driver supports the following optional settings in the ups.conf(5): community=value SNMP community to use (default = public) sdtype=value Shutdown type to use - possible values: 0 = Soft shutdown or powerdown, depending on line status (default) 1 = Soft shutdown followed by powerdown 2 = Instant shutdown 3 = Shutdown with grace period REQUIREMENTS
You will need to install the Net-SNMP package from http://www.net-snmp.org/ before building this driver. INSTALLATION
This driver is not built by default. You can build it by using "configure --with-drivers=powernet" before calling make. IMPLEMENTATION
The hostname of the UPS is specified with the "port" value in ups.conf, i.e.: [ap9606] driver = powernet port = apc-snmp-ups.example.com community = writable AUTHORS
Dmitry Frolov (powernet) Hans Ekkehard Plesser (snmp-ups) Arnaud Quette (snmp-ups) SEE ALSO
APC's PowerNet MIB v3.3.0 Available online at http://apcc.com/tools/download/ The core driver: nutupsdrv(8) Internet resources: The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/ NUT mailing list archives and information: http://lists.exploits.org/ Tue Oct 22 2002 powernet(8)
All times are GMT -4. The time now is 09:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy