I think my script is working but i am trying to understand while I am tracing to see if it's realli working..
can somebody please comment.. also. is there different way to write this in shell?
sh -x findbiggestnum 1 2 3
+
big=0
+
big=1
+
big=2
+
big=3
+ echo 3
3
big=0
... (3 Replies)
Let's say I am trying to find out how many times someone has logged into the machine. Use last to display all the different logins, several names pop up, some multiple times. All I have been able to figure out is the total number of logins, but I can't determine how to compare if $1(user name) is... (3 Replies)
Hi there
does anybody know how i can get the line number from an entry or entries in a file ?? for example if i had a file
test1
test2
test3
test1
and i needed to get the line numbers for all instances of test1 in that file
with the answer being (1,4)
Would anybody be able... (7 Replies)
Hi, is there a command that takes the PID of a process and that only diplays it's ni number?
I`m pretty sure it would require pipes but I tried a few things that ended up miserably...
Since the ps command doesn't show the ni unless I do ps -o ni but then I can't find a way to search the right... (2 Replies)
Hi All,
I wnat to know how to find out the Server serial number in command prompt?
I am using sneep command but it throughing unknown.
Thanks and Regards, (8 Replies)
I am trying to find out the number of dtsessions.
using the command
wc -l $FILE_NAME
it works fine
But when I try to assign this value to some variable using the command
set NUM_DT_SESSION=$(wc -l $FILE_NAME)
it shows error Variable syntax
find below the complete command... (1 Reply)
Hello,
Here is my question. I have a file which contains the html values. I have to find the decimal number from it. It is tagged around >68.74<. Please help me on it..
alt='' ><\/td>\n\t\t<td align=\"right\" class='data_table_text data_table_conv_averages_text' \
style='padding-right:... (1 Reply)
Hi All,
I have a list of data in the listing file and I run row by row to process the record, but how to identify what is the current process line number ?
Thanks. (2 Replies)
Perl::Critic::Policy::Subroutines::ProhibitReturnSort(3)User Contributed Perl DocumentatioPerl::Critic::Policy::Subroutines::ProhibitReturnSort(3)NAME
Perl::Critic::Policy::Subroutines::ProhibitReturnSort - Behavior of "sort" is not defined if called in scalar context.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
The behavior of the builtin "sort" function is not defined if called in scalar context. So if you write a subroutine that directly
"return"s the result of a "sort" operation, then you code will behave unpredictably if someone calls your subroutine in a scalar context.
This Policy emits a violation if the "return" keyword is directly followed by the "sort" function. To safely return a sorted list of
values from a subroutine, you should assign the sorted values to a temporary variable first. For example:
sub frobulate {
return sort @list; # not ok!
@sorted_list = sort @list;
return @sort # ok
}
KNOWN BUGS
This Policy is not sensitive to the "wantarray" function. So the following code would generate a false violation:
sub frobulate {
if (wantarray) {
return sort @list;
}
else{
return join @list;
}
}
CONFIGURATION
This Policy is not configurable except for the standard options.
CREDITS
This Policy was suggested by Ulrich Wisser and the <http://iis.se> team.
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All 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.16.3 2014-06-09 Perl::Critic::Policy::Subroutines::ProhibitReturnSort(3)