Hi
Someone logged on the system with a Normal user and changed the password , for this user , how can i know ? who changed the password from which terminal ?
regards
Georges (5 Replies)
Hi,
At the moment, I have inserted an actual filename to conduct searches through it etc... Instead, I want the user to choose a filename and then do the searches against this file, instead of already having specified the file in the code. How would I do this? I tried doing the following, but it... (5 Replies)
Hi ,,, i just come across this forum and i make it a must to be pay a visit here everyday and through it am learning a lots of things which am sure i will be able to share later...
So i have a prob with my pc when i try to change my Ip address in the dos command using ipconfig command i got a... (1 Reply)
Discussion started by: Lutchumaya
1 Replies
4. Post Here to Contact Site Administrators and Moderators
I work on a UNIX HP 10.20 system that recently crashed. I am new with UNIX but I pick things up quick. The system I work on consists of two computers with the same basic hardware config. I have been having trouble loading the program software it uses, NOT the UNIX software, so I used the a... (1 Reply)
Hello,
I want to write a ksh script about changing UID and changing group with GID. There are multiple servers i want to perform that job.
linux1
linux2
linux3
linux4
linux5 ......
.
.
.
.
.
1.) How can i enter "password" in script rather asking me?
I was trying this...
ssh... (2 Replies)
Hi experts
I have to change the default router of some system
I tried changing by deleing the existing route by following line
#route delete default 172.24.2.101
then I added executed the below line to add the new router
#route add default 172.24.1.254
... (9 Replies)
Write a shell program to replace the starting alphabet "a" with "k" for the file names in the current directory.
Note : Change only the file names starting with "a". Rest of the file names remains unchanged.
Homework. Replies deleted. Closed. (0 Replies)
Hi all
Im trying to learn the basics of bash and am struggling with some file manipulation. I am trying to run a script that once you have logged in allows you to change your password which is held (along with the corresponding username) in a different file called usernames. When i try to run my... (2 Replies)
I have a input file like this
select column1,column2 from tablename where column3='1000000001';
select column1,column2 from tablename where column3='1000000002';
select column1,column2 from tablename where column3='1000000003';
select column1,column2 from tablename where column3='1000000004';... (4 Replies)
Discussion started by: nsuresh316
4 Replies
LEARN ABOUT OSX
sub::quote
Sub::Quote(3) User Contributed Perl Documentation Sub::Quote(3)NAME
Sub::Quote - efficient generation of subroutines via string eval
SYNOPSIS
package Silly;
use Sub::Quote qw(quote_sub unquote_sub quoted_from_sub);
quote_sub 'Silly::kitty', q{ print "meow" };
quote_sub 'Silly::doggy', q{ print "woof" };
my $sound = 0;
quote_sub 'Silly::dagron',
q{ print ++$sound % 2 ? 'burninate' : 'roar' },
{ '$sound' => $sound };
And elsewhere:
Silly->kitty; # meow
Silly->doggy; # woof
Silly->dagron; # burninate
Silly->dagron; # roar
Silly->dagron; # burninate
DESCRIPTION
This package provides performant ways to generate subroutines from strings.
SUBROUTINES
quote_sub
my $coderef = quote_sub 'Foo::bar', q{ print $x++ . "
" }, { '$x' => };
Arguments: ?$name, $code, ?\%captures, ?\%options
$name is the subroutine where the coderef will be installed.
$code is a string that will be turned into code.
"\%captures" is a hashref of variables that will be made available to the code. See the "SYNOPSIS"'s "Silly::dagron" for an example using
captures.
options
o no_install
Boolean. Set this option to not install the generated coderef into the passed subroutine name on undefer.
unquote_sub
my $coderef = unquote_sub $sub;
Forcibly replace subroutine with actual code. Note that for performance reasons all quoted subs declared so far will be globally
unquoted/parsed in a single eval. This means that if you have a syntax error in one of your quoted subs you may find out when some other
sub is unquoted.
If $sub is not a quoted sub, this is a no-op.
quoted_from_sub
my $data = quoted_from_sub $sub;
my ($name, $code, $captures, $compiled_sub) = @$data;
Returns original arguments to quote_sub, plus the compiled version if this sub has already been unquoted.
Note that $sub can be either the original quoted version or the compiled version for convenience.
inlinify
my $prelude = capture_unroll {
'$x' => 1,
'$y' => 2,
};
my $inlined_code = inlinify q{
my ($x, $y) = @_;
print $x + $y . "
";
}, '$x, $y', $prelude;
Takes a string of code, a string of arguments, a string of code which acts as a "prelude", and a Boolean representing whether or not to
localize the arguments.
capture_unroll
my $prelude = capture_unroll {
'$x' => 1,
'$y' => 2,
};
Generates a snippet of code which is suitable to be used as a prelude for "inlinify". The keys are the names of the variables and the
values are (duh) the values. Note that references work as values.
CAVEATS
Much of this is just string-based code-generation, and as a result, a few caveats apply.
return
Calling "return" from a quote_sub'ed sub will not likely do what you intend. Instead of returning from the code you defined in
"quote_sub", it will return from the overall function it is composited into.
So when you pass in:
quote_sub q{ return 1 if $condition; $morecode }
It might turn up in the intended context as follows:
sub foo {
<important code a>
do {
return 1 if $condition;
$morecode
};
<important code b>
}
Which will obviously return from foo, when all you meant to do was return from the code context in quote_sub and proceed with running
important code b.
perl v5.16.2 2012-07-04 Sub::Quote(3)