Sponsored Content
Full Discussion: Perl issue - please help!
Top Forums Shell Programming and Scripting Perl issue - please help! Post 302318114 by ghostdog74 on Wednesday 20th of May 2009 09:13:43 PM
Old 05-20-2009
another way
Code:
my @NC = ();
my $data_file = 'file';
open (my $IN, $data_file) or die "can't open $data_file $!";
while(<$IN>){   
   if(/<tr bgcolor="#ddffff">/){ $f=1;}
   if ($f && /\b(NC_\d+)\b/){
     push @NC, $1;    
     $f=0;
   }
}
print "$_\n" for @NC;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

issue with if loop in perl

Hi I have a log file, I am having problem with "if else" loop in my perl script which does, find a string in that file ,If that string is found append to success.txt else append it to failed.txt. problem is: else part of loop it is not working I am adding problem part of the script. ... (4 Replies)
Discussion started by: amitrajvarma
4 Replies

2. Shell Programming and Scripting

perl issue ..

hi one perl issue i have xml file with 2 values and one condition b.w them <rule> <val1>12</val1> <cond>and</cond> <val2>13</val2> </rule> i read these values in hash in perl code $one{val1} = 12 $one{cond} = and $one{val2} = 13 now i want to form... (3 Replies)
Discussion started by: zedex
3 Replies

3. Shell Programming and Scripting

Perl Script Issue - Please Help * Thanks!!!

Please help me with my script please. I am trying to do the following: 1. Read files for the current directory 2. Open and read from nbe files files only 3. Read only the lines with the results pattern 4. Split the line and print 3rd field Please indicate what line I need to modify. ... (8 Replies)
Discussion started by: jroberson
8 Replies

4. Shell Programming and Scripting

Perl Issue

Hi, I got this script from the web, this generates an LDAP report in CSV format. #!/usr/bin/perl # # Copyright (c) 2004 # Ali Onur Cinar &060;cinar&064;zdo.com&062; # # License: # # Permission to use, copy, modify, and distribute this software and its # documentation for... (23 Replies)
Discussion started by: raj001
23 Replies

5. Shell Programming and Scripting

wc -l command issue with perl

Hi Team, the Following program execute with out error but the out is not save with create2.txt. kindly help me!!! print "Enter your Number \n"; my $name = <STDIN>; if ($name =="*91111*") { @dirlist1 = `wc -l $name > create2.txt`; } else {print "do not match";} (3 Replies)
Discussion started by: adaleru
3 Replies

6. Shell Programming and Scripting

perl command issue

Hi, Please could someone advise on a perl command : export ENVPROP="$HOME/cfg/environment.properties.template" export LM_LICENSE=`awk -F= '!/^#/ && /LM_LICENSE/{print $2}' environment.properties` echo $LM_LICENSE $DATA_FILE/licenses/sample.demo.lic perl -i -npe... (1 Reply)
Discussion started by: venhart
1 Replies

7. Shell Programming and Scripting

PERL - issue with OPEN

Hi, I have a menu script written in PERL which calls some shell scripts and displays the return. I'm having a problem with OPEN. A section of the code is below: `./scriptlist.ksh 1`; open OUTPUT, "</home/$SCRIPTUSER/output"; { local $/ = undef; $_ =... (2 Replies)
Discussion started by: chris01010
2 Replies

8. Shell Programming and Scripting

Perl format issue

Input : day :15 and count -100 printf ("%6.6ld %10.10s %s\n",day,count) any idea what would be the format it will be. (3 Replies)
Discussion started by: ramkumar15
3 Replies

9. Shell Programming and Scripting

Out of memory issue in perl

I am getting a out of memory issue while executing the perl program. Per version : /opt/acc_perl/lib/site_perl/5.14.2 Read in 54973 total records Read in 54973 table records from table. Out of memory! so the job get failed due to out of memory. need to get rid of the out of memory... (3 Replies)
Discussion started by: ramkumar15
3 Replies

10. Programming

Perl - EMail issue - NEED Help

I have a perl that is sending emails in a bad format: "begin 644 Included.doc M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ*BHJ*BH*4U5#0T534T953"!-1$XG<R!F;W(@07)C:&EV92!022`M M($-A;F-E;`HJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ... (1 Reply)
Discussion started by: mrn6430
1 Replies
LIBLINEAR-TRAIN(1)					      General Commands Manual						LIBLINEAR-TRAIN(1)

NAME
liblinear-train - train a linear classifier and produce a model SYNOPSIS
liblinear-train [options] training_set_file [model_file] DESCRIPTION
liblinear-train trains a linear classifier using liblinear and produces a model suitable for use with liblinear-predict(1). training_set_file is the file containing the data used for training. model_file is the file to which the model will be saved. If model_file is not provided, it defaults to training_set_file.model. To obtain good performances, sometimes one needs to scale the data. This can be done with svm-scale(1). OPTIONS
A summary of options is included below. -s type Set the type of the solver: 0 ... L2-regularized logistic regression 1 ... L2-regularized L2-loss support vector classification (dual) (default) 2 ... L2-regularized L2-loss support vector classification (primal) 3 ... L2-regularized L1-loss support vector classification (dual) 4 ... multi-class support vector classification 5 ... L1-regularized L2-loss support vector classification 6 ... L1-regularized logistic regression 7 ... L2-regularized logistic regression (dual) -c cost Set the parameter C (default: 1) -e epsilon Set the tolerance of the termination criterion For -s 0 and 2: |f'(w)|_2 <= epsilon*min(pos,neg)/l*|f'(w0)_2, where f is the primal function and pos/neg are the number of positive/negative data (default: 0.01) For -s 1, 3, 4 and 7: Dual maximal violation <= epsilon; similar to libsvm (default: 0.1) For -s 5 and 6: |f'(w)|_inf <= epsilon*min(pos,neg)/l*|f'(w0)|_inf, where f is the primal function (default: 0.01) -B bias If bias >= 0, then instance x becomes [x; bias]; if bias < 0, then no bias term is added (default: -1) -wi weight Weight-adjusts the parameter C of class i by the value weight -v n n-fold cross validation mode -q Quiet mode (no outputs). EXAMPLES
Train a linear SVM using L2-loss function: liblinear-train data_file Train a logistic regression model: liblinear-train -s 0 data_file Do five-fold cross-validation using L2-loss SVM, using a smaller stopping tolerance 0.001 instead of the default 0.1 for more accurate solutions: liblinear-train -v 5 -e 0.001 data_file Train four classifiers: positive negative Cp Cn class 1 class 2,3,4 20 10 class 2 class 1,3,4 50 10 class 3 class 1,2,4 20 10 class 4 class 1,2,3 10 10 liblinear-train -c 10 -w1 2 -w2 5 -w3 2 four_class_data_file If there are only two classes, we train ONE model. The C values for the two classes are 10 and 50: liblinear-train -c 10 -w3 1 -w2 5 two_class_data_file Output probability estimates (for logistic regression only) using liblinear-predict(1): liblinear-predict -b 1 test_file data_file.model output_file SEE ALSO
liblinear-predict(1), svm-predict(1), svm-train(1) AUTHORS
liblinear-train was written by the LIBLINEAR authors at National Taiwan university for the LIBLINEAR Project. This manual page was written by Christian Kastner <debian@kvr.at>, for the Debian project (and may be used by others). March 08, 2011 LIBLINEAR-TRAIN(1)
All times are GMT -4. The time now is 06:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy