Hello ,
I am trying to replace a word :: complete to Failed .
work: complete
Sed command which i am using is given below ::
sed s/work: complete/Failed/g temp1.txt > temp2.txt (Sed command is grabled if i use the above .. because of space which is there between work: and complete. I... (6 Replies)
Hi,
I have to replace the character AL2 with AL16 which I have in one of my text file .
I used the sed command like this
sed 's/sed 's/AL2/AL16/g' test_carr.dat>test_carr1.dat
But it is not replacing this value to the output file.
The test_carr.dat file contains data like this
cat... (1 Reply)
Hi everybody,
I have come across a typical problem:
I need to use sed command to replace an apostrophe but it is saying no match found in the error
sed -e 's/`/'/g' ...but it is not working. Can you please tell me how to use this apostrophe in this sed command please. Thanks.
Rubin (8 Replies)
Hello,
I want to remove the / found when executing the date command. When I use: date +%D | sed 's/\///'
I get: 1105/09
I tried: date +%D | sed 's/\*$///'
I need to remove all / from the date command, but it does not seem to work (5 Replies)
I ran one the script in debug mode in linux and have a problem
ret='$prmAttunityUser=ais'
Now i need to remove $ from this '$prmAttunityUser=ais' so i had added a sed command like this sed 's/$//g' but its not working could you all please help me with an alternate command
I want the output... (3 Replies)
Hi All,
I am trying to use a variable within the sed command but I am not able to get the output.
When I am using the following command (without variable) its working fine:
sed -n '/2011\/12\/10 18:11:11./,$p' < Log.txt > Delta_Log.txt
But when I am putting the value 2011\/12\/10... (4 Replies)
I have a file that contains lines like this:
allgroups: cn=Role1,cn=groups,o=xyz,st=mn,c=us
allgroups: cn=Role1,cn=groups,o=xyz,st=mn,c=us
I want to remove the string :
,cn=groups,o=xyz,st=mn,c=us
and so I tried to use SED. i tried to assign it to a variable and use it:
... (3 Replies)
Hi,
I want to use a code like
sed -n "1,9988p" filename | wc -l
I tried
from=1
till=9988
sed -n "/$from/,/$till/p" filename |wc -l
Issue:
sed -n "1,9988p" filename | wc -l -- Returns 9988 rows
But
sed -n "/$from/,/$till/p" filename |wc -l # Returns > 9988 rows(Complete file)
I... (2 Replies)
Hi,
I am using sed command to extract data from my log file for a certain time interval. From and To "time" are my input arguments.
Now if i use the sed command on command line. I get the desired results and If i use it in script.It fails.
sed command as command line:
sed -n '/04-Mar-2015... (6 Replies)
Hi,
I have a script that replaces one string with the other in all files under the specified directory.
!/bin/bash
# **************** Change Variables Here ************
startdirectory="/opt/app/properties/tmp_new"
searchterm="Oracle/Middleware/"
replaceterm=""
#... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT DEBIAN
lingua::stopwords
Lingua::StopWords(3pm) User Contributed Perl Documentation Lingua::StopWords(3pm)NAME
Lingua::StopWords - Stop words for several languages.
SYNOPSIS
use Lingua::StopWords qw( getStopWords );
my $stopwords = getStopWords('en');
my @words = qw( i am the walrus goo goo g'joob );
# prints "walrus goo goo g'joob"
print join ' ', grep { !$stopwords->{$_} } @words;
DESCRIPTION
In keyword search, it is common practice to suppress a collection of "stopwords": words such as "the", "and", "maybe", etc. which exist in
in a large number of documents and do not tell you anything important about any document which contains them. This module provides such
"stoplists" in several languages.
Supported Languages
|-----------------------------------------------------------|
| Language | ISO code | default encoding | also available |
|-----------------------------------------------------------|
| Danish | da | ISO-8859-1 | UTF-8 |
| Dutch | nl | ISO-8859-1 | UTF-8 |
| English | en | ISO-8859-1 | UTF-8 |
| Finnish | fi | ISO-8859-1 | UTF-8 |
| French | fr | ISO-8859-1 | UTF-8 |
| German | de | ISO-8859-1 | UTF-8 |
| Hungarian | hu | ISO-8859-1 | UTF-8 |
| Italian | it | ISO-8859-1 | UTF-8 |
| Norwegian | no | ISO-8859-1 | UTF-8 |
| Portuguese | pt | ISO-8859-1 | UTF-8 |
| Spanish | es | ISO-8859-1 | UTF-8 |
| Swedish | sv | ISO-8859-1 | UTF-8 |
| Russian | ru | KOI8-R | UTF-8 |
|-----------------------------------------------------------|
FUNCTIONS
getStopWords
my $stoplist = getStopWords('en');
my $utf8_stoplist = getStopWords('en', 'UTF-8');
Retrieve a stoplist in the form of a hashref where the keys are all stopwords and the values are all 1.
$stoplist = {
and => 1,
if => 1,
# ...
};
getStopWords() expects 1-2 arguments. The first, which is required, is an ISO code representing a supported language. If the ISO code
cannot be found, getStopWords returns undef.
The second argument should be 'UTF-8' if you want the stopwords encoded in UTF-8. The UTF-8 flag will be turned on, so make sure you
understand all the implications of that.
SEE ALSO
The stoplists supplied by this module were created as part of the Snowball project (see <http://snowball.tartarus.org>,
Lingua::Stem::Snowball).
Lingua::EN::StopWords provides a different stoplist for English.
AUTHOR
Maintained by Marvin Humphrey <marvin at rectangular dot com>. Original author Fabien Potencier, <fabpot at cpan dot org>.
COPYRIGHT AND LICENSE
Copyright 2004-2008 Fabien Potencier, Marvin Humphrey
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or,
at your option, any later version of Perl 5 you may have available.
perl v5.10.0 2009-02-23 Lingua::StopWords(3pm)