10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Guys,
I like to output every command executed in the script to a file.
I have tried set -x which does the same.
But it is not giving the logs of the child script which is being called from my script.
Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies
2. UNIX for Dummies Questions & Answers
I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing
set
you can also use them "on the command line when running a script..." and it lists this in a small table:
set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies
3. HP-UX
Hi,
I am using hp unix
i want to know the use of the following commands
set --
set - variable
thanks (4 Replies)
Discussion started by: gomathi
4 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
Some clarification regarding the unix set command for ksh env.
I read up the man pages, but ended up more blur. Eg.
- Turns off -x and -v flags and stops examining argu-
ments for flags.
- Does not change any of the flags. This option is
... (1 Reply)
Discussion started by: srage
1 Replies
5. Shell Programming and Scripting
hi all,
Please tell all the uses of set -x command.
Also can you tell about other options which can be used with set command.
Thanks:)
sumit (3 Replies)
Discussion started by: sumit207
3 Replies
6. UNIX for Dummies Questions & Answers
I have heard the following command and seen people using it at shell but I don't know what it is for and when it is used. I will appreciate any comment regarding the use of this command.
set -o vi (2 Replies)
Discussion started by: agasamapetilon
2 Replies
7. Shell Programming and Scripting
Hi,
I am new to unix and trying to learn shell scripting. I am using Redhat linux instead of unix and using Bash shell.
I typed some code which consist of "set" command. I got the code from a book.
The code is,
set 'who am i'
echo $name
Actually the... (3 Replies)
Discussion started by: saravanakumar
3 Replies
8. Shell Programming and Scripting
i have a script in which i go to a particular dir and list all its file
------------------------------------------------------------------------
#!/bin/ksh
if test -d systemProperties
then
set --`cd systemProperties`
for i in *
do
echo "$i" >> lastm2.txt
done
fi... (2 Replies)
Discussion started by: ali560045
2 Replies
9. Shell Programming and Scripting
Hello
I'm using command "set" to count number of word in file .
But I don't know how to get number of lines in file using commnad "set " ?.
Please Help.
#!/bin/sh
set -- `cat $1`
echo " $# words " # wc -w $1 (4 Replies)
Discussion started by: scotty_123
4 Replies
10. UNIX for Dummies Questions & Answers
Hi Unixers, :)
In a shell script i found the following statements
mline='grep\^ 1111 emaster.dbf
set -- $mline
The first statement searches the emaster.dbf file for the code 1111 and ifit finds any such line it gets that line and stores it in mline.
But iam getting little bit confusion with... (4 Replies)
Discussion started by: ravi raj kumar
4 Replies
Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEUser3Contributed Perl DocuPerl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval(3pm)
NAME
Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval - Write "eval { my $foo; bar($foo) }" instead of "eval "my $foo; bar($foo);"".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
The string form of "eval" is recompiled every time it is executed, whereas the block form is only compiled once. Also, the string form
doesn't give compile-time warnings.
eval "print $foo"; # not ok
eval {print $foo}; # ok
CONFIGURATION
There is an "allow_includes" boolean option for this Policy. If set, then strings that look like they only include a single "use" or
"require" statement (with the possible following statement that consists of a single number) are allowed. With this option set, the
following are flagged as indicated:
eval 'use Foo'; # ok
eval 'require Foo'; # ok
eval "use $thingy;"; # ok
eval "require $thingy;"; # ok
eval "use $thingy; 1;"; # ok
eval "require $thingy; 1;"; # ok
eval 'use Foo; blah;'; # still not ok
eval 'require Foo; 2; 1;'; # still not ok
eval 'use $thingy;'; # still not ok
eval 'no Foo'; # still not ok
If you don't understand why the number is allowed, see Perl::Critic::Policy::ErrorHandling::RequireCheckingReturnValueOfEval.
This option inspired by Ricardo SIGNES' Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire.
SEE ALSO
Perl::Critic::Policy::ControlStrucutres::RequireBlockGrep
Perl::Critic::Policy::ControlStrucutres::RequireBlockMap
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.14.2 2012-06-07 Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval(3pm)