Hi,
when i compile my java code in UNIX using javac, the class file is getting created. But when i try to run the code using java - classpath command, i get the following error.
----------------------------------------
/u/up11/sample/request:>java -classpath /u/up11/sample/request... (0 Replies)
Hi all,
I am writing a set of scripts and some of these are nested within others. I want to be able to execute a single high-level script at the command-line, which in turn may invoke other scripts as required, and when a failure occurs in any of the nested scripts, I want to be able to track... (2 Replies)
Hi,
I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window
$./dbProcess.sh stop
#### Run Details ######
Hostname : server-hop-1... (4 Replies)
Hi,
I would like to capture commands on Unix SunOS. I am aware of script utility but the problem is Script utility writes to file after a sizeable chunk of data.
I need to access each command as they are typed, Is it possible in Unix..?
Thx (1 Reply)
I am running a SAS program within K-shell. This SAS program gives me return code of 3000. However, when I check return code in my K-shell, it displays RC=2.
Can someone tell me how to capture RC from SAS to K-shell?
Thanks.
Pramodini (2 Replies)
Hi,
I have a bash script which calls a few "make". I would like to know whether the makefile failed with any errors. How do I do that in the script?
Thanks,
S (2 Replies)
I am trying to write a shell script for monitoring the file system mount.
command I am using will retrieve a output as shown below.
/dev/fsv29 2% /apps/rj/pgl/bslSys
I also need to add exception mounts in a file and I would like script to ignore the mount which I specify.
If I add the... (6 Replies)
Hi All,
I want to capture all the operations performed in the terminal. So to achieve this I used “script” command. This works as I expected. But this command captures all the standard output which is redirected to terminal. For example if i “tail” a file, even the tail output is getting... (2 Replies)
Hi Folks,
please advise , I have logs generated on unix machine at location /ops/opt/aaa/bvg.log , now sometimes there come exception in these logs also, so I want to write such a script such that it should continuously monitor these logs and whenever any exception comes that is it try to find... (3 Replies)
Hi All,
Suppose I want to take a screenshot of a website say Google and save that image. How should I do it?
I tried wget with this but of no help. It just makes a particular file in jpeg format but on opening the same it says corrupted. Although I can edit the jpeg as an HTML file.
wget... (15 Replies)
Perl::Critic::Policy::RegularExpressions::ProhibitUnusedUseruContributed Perl Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture(3pm)NAME
Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture - Only use a capturing group if you plan to use the captured value.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Perl regular expressions have multiple types of grouping syntax. The basic parentheses (e.g. "m/(foo)/") captures into the magic variable
$1. Non-capturing groups (e.g. "m/(?:foo)/" are useful because they have better runtime performance and do not copy strings to the magic
global capture variables.
It's also easier on the maintenance programmer if you consistently use capturing vs. non-capturing groups, because that programmer can tell
more easily which regexps can be refactored without breaking surrounding code which may use the captured values.
CONFIGURATION
This Policy is not configurable except for the standard options.
CAVEATS
"qr//" interpolation
This policy can be confused by interpolation of "qr//" elements, but those are always false negatives. For example:
my $foo_re = qr/(foo)/;
my ($foo) = m/$foo_re (bar)/x;
A human can tell that this should be a violation because there are two captures but only the first capture is used, not the second. The
policy only notices that there is one capture in the regexp and remains happy.
"@-", "@+", $LAST_MATCH_START and $LAST_MATCH_END
This policy will only recognize capture groups referred to by these variables if the use is subscripted by a literal integer.
$^N and $LAST_SUBMATCH_RESULT
This policy will not recognize capture groups referred to only by these variables, because there is in general no way by static analysis to
determine which capture group is referred to. For example,
m/ (?: (A[[:alpha:]]+) | (Nd+) ) (?{$foo=$^N}) /smx
makes use of the first capture group if it matches, or the second capture group if the first does not match but the second does.
CREDITS
Initial development of this policy was supported by a grant from the Perl Foundation.
AUTHOR
Chris Dolan <cdolan@cpan.org>
COPYRIGHT
Copyright (c) 2007-2011 Chris Dolan. Many rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module
perl v5.14.22012-06-07Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture(3pm)