Hi,
I am not sure how to start doing this so I hope to get some advice as to how to start.
I have 2 files. The source file contains data that I needed is in columns delimited by ";". For example, in this format:
"CONTINENT","COUNTRY","CITY","ID"
"asia","japan","tokyo","123"... (21 Replies)
Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Hi,
I want to delete the contents of a file which are matching with contents of other file in shell scripting.
Ex.
file1
sheel,sumit,1,2,3,4,5,6,7,8
sumit,rana,2,3,4,5,6,7,8,9
grade,pass,2,3,4,5,6,232,1,1
name,sur,33,1,4,12,3,5,6,8
sheel,pass,2,3,4,5,6,232,1,1
File2... (3 Replies)
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to... (2 Replies)
Hi so far I created this script:
vi loop.beta.sh
for i in `cat extract.filenames.tabc`
do
echo $i
done>$i
===
This is the original text file.
$ more tabc.txt
-rwx------- 1 alice staff 1586 2010-11-05 02:27 request-key
.conf
-rwx------- 1 ted staff 126 ... (3 Replies)
FILE_ID extraction from file name and save it in CSV file after looping through each folders
My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save it in a CSV file. How do I do that?
I have folders in unix environment, directory structure is... (15 Replies)
Hi All,
Please help.
I have got a file which contains a listing of a file and some directories after it, one by one. I am calling this file xyz.txt here
file1
dir1
dir2
dir3
dir4
file2
dir5
dir6
dir7
dir8
file3
dir9
dir10
dir11
dir12 (6 Replies)
Hi,
I am doing something basic, but I am missing something. Im trying to read the contents of a file and taking those values and connecting to a database. However, it only connect to one (or reads in) value and then exists.
Here is what it looks like:
listname.txt
db1
db2
db3
Script:... (15 Replies)
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Hi all,
I am trying to loop through the string contents of an array, to add it during the saving of the output files. I am trying this code to print each column and save it to unique file name, but it doesn't work. Thanks for any help.
fnam=(japan usa uk)
alldata.dat contained sample data... (1 Reply)
Discussion started by: ida1215
1 Replies
LEARN ABOUT DEBIAN
text::context
Text::Context(3pm) User Contributed Perl Documentation Text::Context(3pm)NAME
Text::Context - Handle highlighting search result context snippets
SYNOPSIS
use Text::Context;
my $snippet = Text::Context->new($text, @keywords);
$snippet->keywords("foo", "bar"); # In case you change your mind
print $snippet->as_html;
print $snippet->as_text;
DESCRIPTION
Given a piece of text and some search terms, produces an object which locates the search terms in the message, extracts a reasonable-length
string containing all the search terms, and optionally dumps the string out as HTML text with the search terms highlighted in bold.
new
Creates a new snippet object for holding and formatting context for search terms.
keywords
Accessor method to get/set keywords. As the context search is done case-insensitively, the keywords will be lower-cased.
paras
@paras = $self->paras($maxlen)
Return shortened paragraphs to fit together into a snippet of at most $maxlen characters.
as_text
Calculates a "representative" string which contains the given search terms. If there's lots and lots of context between the terms, it's
replaced with an ellipsis.
as_html([ start => "<some tag>", end => "<some end tag>" ])
Markup the snippet as a HTML string using the specified delimiters or with a default set of delimiters ("<span class="quoted">").
AUTHOR
Original author: Simon Cozens
Current maintainer: Tony Bowden
BUGS and QUERIES
Please direct all correspondence regarding this module to:
bug-Text-Context@rt.cpan.org
COPYRIGHT AND LICENSE
Copyright (C) 2002-2005 Kasei
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License; 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.
perl v5.10.1 2009-07-23 Text::Context(3pm)