Sponsored Content
Top Forums Shell Programming and Scripting How to take exact word from output.? Post 302851901 by scriptor on Tuesday 10th of September 2013 04:10:51 AM
Old 09-10-2013
How to take exact word from output.?

Hi

i am writing and i want to take very first word "A924A5FC"from the below o/p
Code:
A924A5FC   0910055313 P S SYSPROC        SOFTWARE PROGRAM ABNORMALLY TERMINATED
A924A5FC   0908091913 P S SYSPROC        SOFTWARE PROGRAM ABNORMALLY TERMINATED
A924A5FC   0906090313 P S SYSPROC        SOFTWARE PROGRAM ABNORMALLY TERMINATED
A924A5FC   0905172313 P S SYSPROC        SOFTWARE PROGRAM ABNORMALLY TERMINATED
A924A5FC   0903220413 P S SYSPROC        SOFTWARE PROGRAM ABNORMALLY TERMINATED

i am using awk but it not helping me
Code:
errpt grep |  awk '{print $1}

and giving below output as

Code:
IDENTIFIER
A924A5FC
A924A5FC
A924A5FC
A924A5FC
A924A5FC

can you suggest me what should i do to get exact word.


scriptor
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

exact string match in a word

Hi all, Is anyone able to help with the following query? I have an input file with several lines of words, e.g. "hellolaylahello" "hellohellohellolayla" I want to search for the exact string "hello" in each line and display: 2 "hellolaylahello" 3 "hellohellohellolayla" I... (11 Replies)
Discussion started by: dr_sabz
11 Replies

2. Shell Programming and Scripting

Exact Word Match

I'm trying to find a exact word match but couldn't do it. ABC ABC_NE Searching for ABC_NE tried grep -w </ABC_NE/> grep "^ABC_NE$" but didn't worked , any awk variants would also help. ---------- Post updated at 08:40 AM ---------- Previous update was at 06:48 AM ---------- I... (2 Replies)
Discussion started by: dinjo_jo
2 Replies

3. Shell Programming and Scripting

Replace exact word with blank

i have a file with the below content file1.txt ALERTADMIN.FIELD ALERTADMIN.TX_ALERTS_LOG i have another file file2 ALERTADMIN.FIELD ALERTADMIN.FIELD_WS ALERTADMIN.SECTION_FIELD_WS ALERTADMIN.TX_ACCT_PROCESSING_WORK_TABLE ALERTADMIN.TX_ACCT_REVIEW_EXEC_METRICS... (2 Replies)
Discussion started by: lavnayas
2 Replies

4. Shell Programming and Scripting

to get the exact word from the file using script

Hi everybody, I have one requirment, i have to get the particular server name from a file. EX: File contents will be like below.. $cat test.txt HostAssignments->new("server1", [ "PS_SERVER", "REG_SERVER", "PS_ORACLE", "OM_G10_AUD", "OM_G10_CAD", "OM_G10_CHF", ... (3 Replies)
Discussion started by: raghu.iv85
3 Replies

5. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

6. UNIX for Dummies Questions & Answers

How to grep the exact string / word ?

Hi All, I have a text / log file which contains strings like meta777, 77, meta, 777. Now I want to write a script which can detect a string 'meta#777' in a text file & number of occurence of 'meta', number of #, number 7, 77, 777. I'm using grep -e '77' filename but no luck. It is returning... (5 Replies)
Discussion started by: adc22
5 Replies

7. Shell Programming and Scripting

Grep Exact word

This may be stupid question but not able to solve it. How to grep exact word and line along with it. TEST:/u00/app/oracle/product/10.2.0/TEST:N TEST2:/u00/app/oracle/product/10.2.0/ODS:N TEST3:/u00/app/oracle/product/10.2.0/TEST:N TEST4:/u00/app/oracle/product/10.2.0/ODS:N... (4 Replies)
Discussion started by: tapia
4 Replies

8. Shell Programming and Scripting

How to get the exact word in awk?

Hi, i have a file that contains the following: ARTPRD01_app = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 11.222.3.4)(PORT = 1540)) (CONNECT_DATA = (SERVICE_NAME = artprd01.com) ARTPRD01 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 11.223.3.1)(PORT =... (2 Replies)
Discussion started by: reignangel2003
2 Replies

9. UNIX for Beginners Questions & Answers

Replace exact word by perl

my inputfile: This is a test and only a test for production - prod. echo "This is a test and only a test for production - prod" | perl -pi -e 's/prod/test/g' outputfile: This is a test and only a test for testuction - test I only want to replace prod, not production. I also... (3 Replies)
Discussion started by: loktamann
3 Replies

10. Shell Programming and Scripting

Grep exact math word

Hi All, i want exact math to search to find it and i tried as like below it not working. My Excepted out : should not get the output that mean exact word math. echo "test.txt|123"|sed 's/|/ /g'|grep -w "test" Thanks (1 Reply)
Discussion started by: bmk123
1 Replies
MooseX::Async(3pm)					User Contributed Perl Documentation					MooseX::Async(3pm)

NAME
MooseX::Async - The Orphanange of Asynchronous Love Children VERSION
This document describes MooseX::Async Version 0.01 SYNOPSIS
There space left intentionally blank. DESCRIPTION
MooseX::Async is a set of Metaclasses for MooseX::POE and it's siblings. Please see them for documentation. DEPENDENCIES
Moose INCOMPATIBILITIES
None reported. BUGS AND LIMITATIONS
No bugs have been reported. Please report any bugs or feature requests to "bug-moosex-poe@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. AUTHOR
Chris Prather "<perigrin@cpan.org>" LICENCE AND COPYRIGHT
Copyright (c) 2007, Chris Prather "<perigrin@cpan.org>". All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. perl v5.10.0 2008-11-13 MooseX::Async(3pm)
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy