Sponsored Content
Top Forums Shell Programming and Scripting Get matching string pattern from a file Post 302531172 by pradebban on Thursday 16th of June 2011 04:10:23 AM
Old 06-16-2011
thank u all Smilie it works!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting a string matching a pattern from a line

Hi All, I am pretty new to pattern matching and extraction using shell scripting. Could anyone please help me in extracting the word matching a pattern from a line in bash. Input Sample (can vary between any of the 3 samples below): 1) Adaptec SCSI RAID 5445 2) Adaptec SCSI 5445S RAID 3)... (8 Replies)
Discussion started by: jharish
8 Replies

2. Shell Programming and Scripting

Fetching string after matching pattern from last

I have a file a file having entries are like @ram@sham@sita @krishan@kumar @deep@kumar@hello@sham in this file all line are having different no of pattern-@. need to fetch the substring after the last pattern. like sita kumar sham thanks in advance (3 Replies)
Discussion started by: saluja.deepak
3 Replies

3. Shell Programming and Scripting

PERL : pattern matching a string stored in a variable

I have two variables, my $filename = "abc_yyyy_mm_dd.txt"; my $filename1 = " abc_2011_11_07.txt"; I need to perform some operations after checking if $filename has $filename1 in it i have used the below code, if($filename =~ /^$filename1/) { ---- -- } (2 Replies)
Discussion started by: irudayaraj
2 Replies

4. UNIX for Dummies Questions & Answers

Extracting sub-string matching the pattern.

Hi, I have a string looks like the following: USERS 32767.9844 UNDOTBS1 32767.9844 SYSAUX 32767.9844 SYSTEM 32767.9844 EMS 8192 EMS 8192 EMS_INDEXES 4096 EMS_INDEXES 4096 8 rows selected. How do I extract a sub-string to get the expected output as following: EMS 8192 EMS_INDEXES 4096 ... (3 Replies)
Discussion started by: NetBear
3 Replies

5. Shell Programming and Scripting

Problems with Multiple Pattern String Matching

I am facing a problem and I would be grateful if you can help me :wall: I have a list of words like And I have a datafile like the box of the box of tissues out of of tissues out of the book, the the book, the pen and the the pen and the I want to find Patterns of “x.*x” where... (2 Replies)
Discussion started by: A-V
2 Replies

6. Shell Programming and Scripting

Sum of column matching pattern/string

Hi All, I have the following output file created as a result of one script called pattern_daily.log $ cat pattern_daily.log Approved|2|Wed, Oct 24, 2012 11:21:09 AM Declined|1|Wed, Oct 24, 2012 11:21:15 AM Approved|2|Wed, Oct 24, 2012 11:24:08 AM Declined|1|Wed, Oct 24, 2012 11:24:18 AM... (4 Replies)
Discussion started by: Gem_In_I
4 Replies

7. Shell Programming and Scripting

PHP - Regex for matching string containing pattern but without pattern itself

The sample file: dept1: user1,user2,user3 dept2: user4,user5,user6 dept3: user7,user8,user9 I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Discussion started by: urello
8 Replies

8. UNIX for Dummies Questions & Answers

String pattern matching and position

I am not an expert with linux, but following various posts on this forum, I have been trying to write a script to match pattern of charters occurring together in a file. My file has approximately 200 million characters (upper and lower case), with about 50 characters per line. I have merged all... (5 Replies)
Discussion started by: biowizz
5 Replies

9. Shell Programming and Scripting

Taking out part of a string by matching a pattern

Hi All, My Problem is like below. I have a file which contains just one row and contains data like PO_CREATE12457888888888889SK1234567878744551111111111SK89456321145789955455555SK8888888815788852222 i want to extract SK12345678 SK89456321 SK88888888 So basically SK and next 8... (4 Replies)
Discussion started by: Asfakul Islam
4 Replies

10. Shell Programming and Scripting

Replace String matching wildcard pattern

Hi, I know how to replace a string with another in a file. But, i wish to replace the below string pattern EncryptedPassword="{gafgfa}]\asffafsf312a" i.e EncryptedPassword="<any random string>" To EncryptedPassword="" i.e remove the random password to a empty string. Can you... (3 Replies)
Discussion started by: mohtashims
3 Replies
CVS2HTML(1)						       Debian user's manual						       CVS2HTML(1)

NAME
cvs2html - render a CVS commit log in HTML SYNOPSIS
cvs2html [-a[-b][-k]] [-n numdif] [-l/-L home] [-e] [-f] [-d MMM DD [YYYY]] [-D DD] [-i image]] [-h] [-v] [-w framewidth] [-s percentage] [-N maxchrono] [-rrev1:rev2] [-c|-C cfilename] -O | -o htmlname [-p cvspath] [-v verbosity] DESCRIPTION
The cvs2html script fetches the commit log for a CVS module and renders it in HTML. -a Generate additional fields and files containing differences between versions in an xdiff-like side by side manner. -b Use spaces as breakpoints to wrap the text, if -a is specified. This is used to stop the two columns from exceeding the total width. -c | -C filename Save a chronologically sorted list of all log entries in html format in filename. Use -C to reverse-sort the file. -d MMM DD [YYYY] Omit all log messages prior to the given date. The first three letters of the month should be used (eg Jun 5). The year is optional. -D DD Omit all log messages older than DD days. -e Print log messages in courier (non-proportional) font. -f Generate individual log files for each file when using -o. -h Show help -i image Make image the background image. -k Ignore changes in lines caused by CVS-keyword substitutions when -a is specified. -l home Make links relative to home. -L home Make links relative to home, but substitute file extensions with .html. -n numdiff Output only the latest numdiff diffs in the log. Older commits will only have the log data displayed. -N maxchrono Show only the latest maxchrono file changes in the chronological list of changes. -o output If output is a directory, all html files produced are stored there, using the name of the repository as the base filename. Other- wise, output is used as the base name. Generate frames for easier browsing. -O output If output is a directory, all html files produced are stored there, using the name of the repository as the base filename. Other- wise, output is used as the base name. -P cvspath Set the cvs path to cvspath. -rrev1:rev2 Show only the log messages between rev1, and rev2. If a file isn't tagged, then the whole revision story of the file is shown. -s percentage Make the width of the left frame, percentage of the window. -v Insert CVSROOT information in the index. -V verbosity Set the verbosity. The higher verbosity is, the more output is printed out. -w framewidth Make the width of the left frame, framewidth pixels. EXAMPLE
cvs2html -l http://cvs.sslug.dk/linuxbog -f -p \ -o cvs2html/index.html -v -a -b -n 6 -C chrono.html Will create a directory called cvs2html directory. This directory will contain a log data file, for every file in the repository. The last 6 commits to every file will have a diff available. All links will be relative to http://cvs.sslug.dk/linuxbog. It will also create a file with all the log data in it, in chronological order. AUTHORS
The cvs2html script was written by Peter Toft and others (see the comments in /usr/bin/cvs2html for an exhaustive list). This manual page was written by Antti-Juhani Kaijanaho for Debian GNU, and modified by Pascal Hakim. SEE ALSO
The file /usr/share/doc/cvs2html/help.txt. The source code to cvs2html, in /usr/bin/cvs2html. cvs(1) Debian Project 1999-12-10 CVS2HTML(1)
All times are GMT -4. The time now is 11:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy