Sponsored Content
Top Forums Shell Programming and Scripting capture till first occurrence. Post 302322161 by Franklin52 on Wednesday 3rd of June 2009 03:23:28 AM
Old 06-03-2009
Should be something like:

Code:
sed 's!C:/India/Apple!D:/Test/Red_Apple!g' file

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Delete line till certain point

Hi, I have a requirement to delete a line till a certain word. Am not sure how to do it e.g I want to delete till the bold character since start of line. Any help is higly appretiated. (2 Replies)
Discussion started by: inq
2 Replies

2. Shell Programming and Scripting

How to print lines till till a pattern is matched in loop

Dear All I have a file like this 112534554 446538656 444695656 225696966 226569744 228787874 113536566 443533535 222564552 115464656 225445345 225533234 I want to cut the file into different parts where the first two columns are '11' . The first two columns will be either... (3 Replies)
Discussion started by: anoopvraj
3 Replies

3. Shell Programming and Scripting

extract till occurance of a string

hi , i have an xml that comes in a single, the entire xml file is read as a single line when i open in edit plus or unix. i need to amend the contents of this xml file. below is the extract from the file <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"... (5 Replies)
Discussion started by: sais
5 Replies

4. Shell Programming and Scripting

Print file till specified line

Hi , I want to print file till line number 33 and stdout to different file. I have used cat -n <file name> which numbers the lines including blank line. now how can i stdout the first 33 lines in to new file. Regards newaix (6 Replies)
Discussion started by: newaix
6 Replies

5. Shell Programming and Scripting

Get the number of lines till I get line

Hi All, I have a file as below: abc.txt ****************************** * HEADER DESCRIPTION ****************************** *Supplier: Prism Customer: MNI -NIGERIA Quantity: 2 Type: PLUG-IN Profile: 70.00 *Subscription: Generic... (5 Replies)
Discussion started by: arunshankar.c
5 Replies

6. Shell Programming and Scripting

Grep with loop till search is done

I need help to put a script where it runs the svn command grep'ing for the ticket# in the comments to see if the ticket was used in the latest commit. so on command line: ./test.sh ticket-1 ticket-2 ticket-3 It should be able to check if ticket-1 is used first and if not then check if... (2 Replies)
Discussion started by: iaav
2 Replies

7. Shell Programming and Scripting

Merge lines till a particular word

Hi Experts, I have a requirement like, I have to search between 2 words (<deviceDetails> and </deviceDetails>) and merge all lines in between into 1 line. Example: <deviceDetails><subscriberName>#UNKNOWN#</subscriberName> <customerNumber>#UNKNOWN#</customerNumber>... (5 Replies)
Discussion started by: satyaatcgi
5 Replies

8. Shell Programming and Scripting

UNIX help to print 50 lines after every 3rd occurrence pattern till end of file

I need help with extract/print lines till stop pattern. This needs to happen after every 3rd occurrence of start pattern and continue till end of file. Consider below is an example of the log file. my start pattern will be every 3rd occurrence of ERROR_FILE_NOT_FOUND and stop pattern will be... (5 Replies)
Discussion started by: NSS
5 Replies

9. Shell Programming and Scripting

Substitute first occurrence of keyword if occurrence between two other keywords

Assume a string that contains one or multiple occurrences of three different keywords (abbreviated as "kw"). I would like to replace kw2 with some other string, say "qux". Specifically, I would like to replace that occurrence of kw2 that is the first one that is preceded by kw1 somewhere in the... (4 Replies)
Discussion started by: M Gruenstaeudl
4 Replies

10. Shell Programming and Scripting

sed print from last occurrence match until the end of last occurrence match

Hi, i have file file.txt with data like: START 03:11:30 a 03:11:40 b END START 03:13:30 eee 03:13:35 fff END jjjjjjjjjjjjjjjjjjjjj START 03:14:30 eee 03:15:30 fff END ggggggggggg iiiiiiiiiiiiiiiiiiiiiiiii I want the below output START (13 Replies)
Discussion started by: Jyotshna
13 Replies
Finance::Quote::IndiaMutual(3)				User Contributed Perl Documentation			    Finance::Quote::IndiaMutual(3)

NAME
Finance::Quote::IndiaMutual - Obtain Indian mutual fund prices from amfiindia.com SYNOPSIS
use Finance::Quote; $q = Finance::Quote->new; %stockinfo = $q->fetch("indiamutual", "amfiindia-code"); # Can failover to other methods %stockinfo = $q->fetch("amfiindia", "amfiindia-code"); # Use this module only. # NOTE: currently no failover methods exist for indiamutual DESCRIPTION
This module obtains information about Indian Mutual Fund prices from the Association of Mutual Funds India website amfiindia.com. The information source "indiamutual" can be used if the source of prices is irrelevant, and "amfiindia" if you specifically want to use information downloaded from amfiindia.com. AMFIINDIA-CODE In India a mutual fund does not have a unique global symbol identifier. This module uses an id that represents the mutual fund on an id used by amfiindia.com. You can the fund is from the AMFI web site http://amfiindia.com/downloadnavopen.asp. LABELS RETURNED
Information available from amfiindia may include the following labels: method link source name currency nav rprice sprice. The link label will be a url location for the NAV list table for all funds. NOTES
amfiindia.com provides a link to download a text file containing all the NAVs. This file is mirrored in a local file /tmp/amfinavlist.txt. The local mirror serves only as a cache and can be safely removed. Currently NAVs of Open-Ended funds are supported. SEE ALSO
AMFI india website - http://amfiindia.com/ Finance::Quote perl v5.12.1 2009-10-05 Finance::Quote::IndiaMutual(3)
All times are GMT -4. The time now is 12:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy