Sponsored Content
Top Forums Shell Programming and Scripting Last occurrence of code between two tags Post 302593680 by mirni on Friday 27th of January 2012 07:37:31 PM
Old 01-27-2012
Glad I could be of help.
Quote:
unix.com should give us an option to post questions directly to someone they are confident on.... If so, I would shoot all my questions on unix to you ..Smilie Smilie Smilie Smilie
This is a public forum, which has a good reason -- it helps people find their solution, when they google it up, and the more people have access to it, the better chances for fast and accurate response. Asking questions directly through private messages is against the rules of the forum, and for a good reason.
I am no guru; there are much more competent people here, which gives me and others an opportunity to improve our skills. The power is in the community, community is the keyword when dealing with open-source software.
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace second occurrence only

HPUX /bin/sh (posix) I have a file as such cat dog mouse deer elk rabbit mouse rat pig I would like to replace the second occurrence of mouse in this file with mouse2. The rest of the file has to stay exactly as is. I'm not sure exactly where mouse might be (could be first,second,third... (5 Replies)
Discussion started by: lyoncc
5 Replies

2. Shell Programming and Scripting

number of occurrence

: i need a bash script to convert the displayed output 12 14 15 12 15 13 to 12 * 2 ,13 * 1,14*1,15*1 Thanks, nevil (2 Replies)
Discussion started by: nevil
2 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Code for exact match to count occurrence

Hi all, I have an input file as below. I would like to count the occurrence of pattern matching 8th field for each line. Input: field_01 field_02 field_03 field_04 field_05 field_06 field_07 field_08 TA T TA T TA TA TA... (3 Replies)
Discussion started by: huiyee1
3 Replies

5. 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
INSTALL(3pm)						User Contributed Perl Documentation					      INSTALL(3pm)

NAME
INSTALL Installation instructions for Math::SparseMatrix DEPENDENCIES
This module requires these other modules and libraries: Math::SparseVector SYNOPSIS
To install this module type the following: perl Makefile.PL make make test make install The exact location of where Math::SparseMatrix will be installed depends on your system configuration. If you do not have authority to write into system directories, you can install Math::SparseMatrix in a local directory that you own and have permissions to read and write into as follows: perl Makefile.PL PREFIX=/YOUR/DIR make make test make install This will install the module into /YOUR/DIR/lib/perl5/site_perl/Math/SparseMatrix.pm If you install Math::SparseMatrix in a local directory, you will have to explicitly set your PERL5LIB environment variable to include: /YOUR/DIR/lib/perl5/site_perl if this directory was not already included. Authors Ted Pedersen, University of Minnesota, Duluth. tpederse at d.umn.edu Mahesh Joshi, Carnegie Mellon University maheshj at cmu.edu COPYRIGHT
Copyright (c) 2006-2008, Ted Pedersen and Mahesh Joshi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. perl v5.10.1 2008-03-25 INSTALL(3pm)
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy