Sponsored Content
Top Forums Shell Programming and Scripting How to Print from matching word to end using awk Post 302453587 by mallak on Wednesday 15th of September 2010 08:38:38 PM
Old 09-15-2010
How to Print from matching word to end using awk

Team,

Could some one help me in Printing from matching word to end using awk

For ex:

Input:

I am tester for now
I am tester yesterday
I am tester tomorrow

O/p

tester for now
tester yesterday
tester tomorrow

i.e Starting from tester till end of sentence

Please help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print matching field using awk

Hi All, I have a string like below: str="Hold=True Map=False 'This will map the data' Run=Yes Modify=False" I want to print the field Run=Yes and retrive the value "Yes". I cannot use simple awk command because the position of the "Run" will be different at different times. Is there a way... (6 Replies)
Discussion started by: deepakgang
6 Replies

2. Shell Programming and Scripting

awk BEGIN END and string matching problem

Hi, Contents of BBS-list file: foo foo foo awk ' BEGIN { print "Analysis of \"foo\"" } /foo/ { ++n } END { print "\"foo\" appears", n, "times." }' BBS-list Output: Analysis of "foo" "foo" appears 3 times. awk ' (3 Replies)
Discussion started by: cola
3 Replies

3. UNIX and Linux Applications

Print date at END clause of AWK

Hi to all! I 'm new in unix programing so... may be I decided a wrong tool to solve the problem but anyway... all road goes to rome jajaja. My question is: There is any way to print date at the END clause of an AWK script. I mean, I'm writing a tool with AWK and the results are redirected to a... (4 Replies)
Discussion started by: fmeriles
4 Replies

4. Shell Programming and Scripting

Print lines matching value(s) in other file using awk

Hi, I have two comma separated files. I would like to see field 1 value of File1 exact match in field 2 of File2. If the value matches, then it should print matched lines from File2. I have achieved the results using cut, paste and egrep -f but I would like to use awk as it is efficient way and... (7 Replies)
Discussion started by: SBC
7 Replies

5. Shell Programming and Scripting

How to print first matching range in awk?

following is input - <Schema> <schema_name>admin</schema_name> <Version>1.1</Version> <schema_name>admin</schema_name> <Version>1.2</Version> </Schema> ... (12 Replies)
Discussion started by: thearpit
12 Replies

6. Shell Programming and Scripting

Search string in unix and print whole matching word

Hi I have requirement to search string starting with specific characters and print whole matching word in that string. example mystr="ATTRIBUTE NAME="Event Name" VALUE="Execute"" I want to search by passing "NAME=" and result should be NAME="Event Name". i am using below command but... (3 Replies)
Discussion started by: tmalik79
3 Replies

7. Shell Programming and Scripting

How to print in awk matching $1 values ,to $1,$4 example given.?

Hi Experts, I am trying to get the output from a matching pattern but unable to construct the awk command: file : aa bb cc 11 dd aa cc 33 cc 22 45 68 aa 33 44 44 dd aa cc 37 aa 33 44 67 I want the output to be : ( if $1 match to "aa" start of the line,then print $4 of that line, and... (3 Replies)
Discussion started by: rveri
3 Replies

8. Shell Programming and Scripting

awk one liner to print to end of line

Given: 1,2,whatever,a,940,sot how can i print from one particular field to the end of line? awk -F"," '{print $2 - endofline}' the delimiter just happens to be a comma "," in this case. in other cases, it could be hypens: 1---2---whatever---a---940---sot (4 Replies)
Discussion started by: SkySmart
4 Replies

9. UNIX for Advanced & Expert Users

awk print all fields except matching regex

grep -v will exclude matching lines, but I want something that will print all lines but exclude a matching field. The pattern that I want excluded is '/mnt/svn' If there is a better solution than awk I am happy to hear about it, but I would like to see this done in awk as well. I know I can... (11 Replies)
Discussion started by: glev2005
11 Replies

10. Shell Programming and Scripting

How to print few lines before and after matching word is found suing grep?

Hi, here are few lines present in the logs. I want to grep on Error and print few lines before and after Error word is found line1 Line2 Line3 Error Line4 Line5 Line6 Line7 I want the output to be Line2 Line3 Error Line5 (1 Reply)
Discussion started by: arghadeep adity
1 Replies
Towitoko Tester(1)					      General Commands Manual						Towitoko Tester(1)

NAME
towitoko-tester -- Towitoko driver CT-API interface tester tool SYNOPSIS
towitoko-tester DESCRIPTION
towitoko-tester is a simple tool that allows executing some simple commands on a smartcard using a Towitoko smartcard reader. It can be used to test that a smartcard can be properly recognized, and that it can be read and written. The tool provides a text based menu interface. Commands that can be executed via the menu depends on the reader card insertion status and the type of card inserted. For memory cards it permits reading and writing data bytes, checking and changing the PIN. For processor cards it permits selecting, reading and updating binary card files. Several readers on different ports can be used at a time. The text menu allows opening, closing and changing current port. The smartcard can be inserted and removed from any initialized reader at any time. The tool will automatically detect when the card is inserted and removed, and will update the information shown in the menu. However you must refresh the menu to see any change reflected. If you have installed pcscd package, and have configured your reader to be used by pscsd, you'll need to stop the pcsc daemon before ini- tializing the reader with towitoko-tester. SEE ALSO
ctapi (3) and ctbcs (3). pcscd (8) AUTHOR
This manual page was written by Carlos Prados <cprados@debian.org>. Towitoko Tester(1)
All times are GMT -4. The time now is 08:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy