Sponsored Content
Top Forums Shell Programming and Scripting start searching a word from the particular record on the result of first occurence change the value Post 302689927 by NareshN on Wednesday 22nd of August 2012 09:20:05 AM
Old 08-22-2012
elixir,

Thank you so much its working.
Could you please explain the command for my understanding
Code:
sed '/ContactAddress/,/Restarts/{
/Restarts/s/[0-9][0-9]*/500/
}' file

Is it possible to replace from its original file without redirecting to temporary file and again moving to original file.
I want to execute this as a command and not through the script

Last edited by NareshN; 08-22-2012 at 10:35 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count the number of occurence of perticular word from file

I want to count the number of occurence of perticular word from one text file. Please tell me "less" command is work in ksh or not. If it is not working then instead of that which command will work. :confused: (40 Replies)
Discussion started by: rinku
40 Replies

2. Shell Programming and Scripting

Delete all occurence of a word in one shot

i have a file called file1 cat file1 i am namish namish lives in India India and namish both are good. I want to delete all the occurences of namish in one shot,if i do it with sed i guess all the lines will be deleted containing the pattern.Suggest me any idea without AWK. Thanks... (6 Replies)
Discussion started by: namishtiwari
6 Replies

3. UNIX for Dummies Questions & Answers

search& count for the occurence of a word

Greetings, I need to search and count all the occurences of a word in all the files in a directory. Any suggestions greatly appreciated. Thanks (1 Reply)
Discussion started by: skoppana
1 Replies

4. Shell Programming and Scripting

finding the number of occurence of a word in a line

suppose i have this line abs|der|gt|dftnrk|dtre i want to count the number of "|" in this line.. how can i do that. plz help:confused: (9 Replies)
Discussion started by: priyanka3006
9 Replies

5. UNIX for Dummies Questions & Answers

counting the occurence of a word

In a file I have to count a particular word. like i need apache how many times. I tried this $ tr "\011" "\012\012"<foo1 | tr -cd "" |sort\uniq -c but I got result like this 32 apache 18 dns 12 doctor Please sugest me (4 Replies)
Discussion started by: pranabrana
4 Replies

6. Shell Programming and Scripting

Perl : Search for next occurence of a word in an array

I have an array as follows: Space: ABC Name: def Age: 22 Type: new Name: fgh Age: 34 Type: old Space: XYZ Name: pqr Age: 44 Type: new : : How can I separate the array with elements starting from Space:ABC until Space: XYZ & put them in a different array & so on... (4 Replies)
Discussion started by: deo_kaustubh
4 Replies

7. Shell Programming and Scripting

Change first occurence

I'm not getting the syntax correct to change a line only on the first occurrence: I've tried to change only the first match and I've tried to change the from the second match forward sed 's/<B>PT#/<tr><td class=\"pt1\" width=\"40%\"><B>pt#/1' $file > tmpfile.html sed ... (0 Replies)
Discussion started by: dba_frog
0 Replies

8. Shell Programming and Scripting

regex - start with a word but ignore that word

Hi Guys. I guess I have a very basic query but stuck with it :( I have a file in which I want to extract particular content. The content is between standard format like : Verify stats A=0 B=12 C=34 TEST Failed Now I want to extract data between "Verify stats" & "TEST Failed" but do... (6 Replies)
Discussion started by: ratneshnagori
6 Replies

9. Shell Programming and Scripting

How to delete last occurence of word using Linux command?

Hi all, I am trying to delete last occurrence of word using sed command. for example. I have input like this on a.id1 = b.id1 and on a.id2 = b.id2 and on a.id3 = b.id3 and and I am expecting output like this on a.id1 = b.id1 and on a.id2 = b.id2 and on a.id3 = b.id3 I just need to... (11 Replies)
Discussion started by: nsk
11 Replies
ElixirFM::Exec(3pm)					User Contributed Perl Documentation				       ElixirFM::Exec(3pm)

NAME
ElixirFM::Exec - Interface to the ElixirFM executable REVISION
$Revision: 946 $ $Date: 2010-04-12 21:27:23 +0200 (Mon, 12 Apr 2010) $ SYNOPSIS
use ElixirFM::Exec; # 'elixir' will be tried out use ElixirFM::Exec '.'; # './elixir' will be invoked use ElixirFM::Exec './elixir'; # './elixir' will be invoked use ElixirFM::Exec 'some/other'; # 'some/other/elixir' unless # 'some/other' is executable ElixirFM::Exec::elixir 'help'; import ElixirFM::Exec 'other/elixir'; # switching to 'other/elixir' ElixirFM::Exec::elixir 'inflect', ['(1320,1)'], "V[PI]---3MS--", "N------P-[IRD]"; ElixirFM::Exec::inflect ['(1320,1)'], "V[PI]---3MS--", "N------P-[IRD]"; DESCRIPTION
The ElixirFM::Exec module provides a simple interface for invoking the ElixirFM executable, which you need to install on your system yourself. The download and further information are at http://sourceforge.net/projects/elixir-fm/ <http://sourceforge.net/projects/elixir-fm/>. AUTHOR
Otakar Smrz "<otakar smrz mff cuni cz>", <http://ufal.mff.cuni.cz/~smrz/> COPYRIGHT &; LICENSE Copyright (C) 2005-2010 Otakar Smrz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. perl v5.12.3 2011-06-13 ElixirFM::Exec(3pm)
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy