04-07-2012
I am going to cry my eyes out! this damn script doesn't work and I can't see my mistakes! I think everything is OK but if user choose two options, the output won't be correct!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
CO UNixware 7.1.1
Hi friends,
I have chopped my case statementt out of my .profile and put it in another script called setsid. The case statement works when run from my .profile but not from my setsid file.
All that the script does is set an environmental variable based on user input.... (7 Replies)
Discussion started by: sureshy
7 Replies
2. Shell Programming and Scripting
cat .servers | while read LINE; do
ssh jason@$LINE $1
done
exit 1
./command.ksh "ls -l ~jason"
Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing?
Thanks!
JP (2 Replies)
Discussion started by: jpeery
2 Replies
3. UNIX for Dummies Questions & Answers
Howdie everyone...
I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*
My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies
4. UNIX for Dummies Questions & Answers
why lp -o <option> doesn't work on my SCO Unix. (4 Replies)
Discussion started by: wendyz
4 Replies
5. Shell Programming and Scripting
I am trying to use bc to calculate the difference between two nano second time stamps. bc does the calculation but seems to ignore the scale option:
micro_start=$(date +%s.%N)
# .. some stuff happens here
micro_stop=$(date +%s.%N)
TOT=$(echo "scale=3; $micro_stop - $micro_start" | bc)... (2 Replies)
Discussion started by: LostInTheWoods
2 Replies
6. Solaris
hello,
The command above seems not working on my solaris 8/9 sparc machines.
a. resulted to the ff below when I instead use "shutdown" only.
Broadcast Message from root (pts/1) on "hostname" date..
The system "hostname" will be shut down in 30 seconds
THE SYSTEM bdosg IS BEING SHUT... (4 Replies)
Discussion started by: lhareigh890
4 Replies
7. UNIX for Dummies Questions & Answers
find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \;
Returns this failure:
mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory
I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies
8. Shell Programming and Scripting
greetings,
the following code isn't working as i expect it to. the first dbl brackets do but the second set gets ignored. ie: if i'm on t70c6n229 it echoes "Something" and i expect it not to. what am i missing?
if " ]] || " ]]; then
echo "Something"
fi
thanx! (9 Replies)
Discussion started by: crimso
9 Replies
9. Shell Programming and Scripting
Hi,
I am using korn shell.
until ]
do
echo "\$# = " $#
echo "$1"
shift
done
To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work.
Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
10. Shell Programming and Scripting
Hi
tail -f $PROGPATH/NBU_pgbaserestore_$1.log | while read LOGLINE
do
if ] && ! ]
then
date "+%d.%B.%Y %H:%M:%S"
echo "ERROR: NBU"
echo "$LOGLINE"
TAILKILL=$(pgrep -P $$ -x tail)
kill -9 $TAILKILL
exit 1
... (3 Replies)
Discussion started by: kvaikla
3 Replies
LEARN ABOUT DEBIAN
acme::damn
Damn(3pm) User Contributed Perl Documentation Damn(3pm)
NAME
Acme::Damn - 'Unbless' Perl objects.
SYNOPSIS
use Acme::Damn;
my $ref = ... some reference ...
my $obj = bless $ref , 'Some::Class';
... do something with your object ...
$ref = damn $obj; # recover the original reference (unblessed)
... neither $ref nor $obj are Some::Class objects ...
DESCRIPTION
Acme::Damn provides a single routine, damn(), which takes a blessed reference (a Perl object), and unblesses it, to return the original
reference.
EXPORT
By default, Acme::Damn exports the method damn() into the current namespace. Aliases for damn() (see below) may be imported upon request.
Methods
damn object
damn() accepts a single blessed reference as its argument, and returns that reference unblessed. If object is not a blessed reference,
then damn() will "die" with an error.
bless reference
bless reference [ , package ]
bless reference [ , undef ]
Optionally, Acme::Damn will modify the behaviour of "bless" to allow the passing of an explicit "undef" as the target package to invoke
damn():
use Acme::Damn qw( bless );
my $obj = ... some blessed reference ...;
# the following statements are equivalent
my $ref = bless $obj , undef;
my $ref = damn $obj;
NOTE: The modification of "bless" is lexically scoped to the current package, and is not global.
Method Aliases
Not everyone likes to damn the same way or in the same language, so Acme::Damn offers the ability to specify any alias on import, provided
that alias is a valid Perl subroutine name (i.e. all characters match "w").
use Acme::Damn qw( unbless );
use Acme::Damn qw( foo );
use Acme::Damn qw( unblessthyself );
use Acme::Damn qw( recant );
Version 0.02 supported a defined list of aliases, and this has been replaced in v0.03 by the ability to import any alias for "damn()".
WARNING
Just as "bless" doesn't call an object's initialisation code, "damn" doesn't invoke an object's "DESTROY" method. For objects that need to
be "DESTROY"ed, either don't "damn" them, or call "DESTROY" before judgement is passed.
ACKNOWLEDGEMENTS
Thanks to Claes Jacobsson <claes@surfar.nu> for suggesting the use of aliases, and Bo Lindbergh <blgl@cpan.org> for the suggested
modification of "bless".
SEE ALSO
bless, perlboot, perltoot, perltooc, perlbot, perlobj.
AUTHOR
Ian Brayshaw, <ian@onemore.org>
COPYRIGHT AND LICENSE
Copyright 2003-2012 Ian Brayshaw
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-02-14 Damn(3pm)