Below is my code , In the code below the "If" condition is getting failed. I dont know what is getting wrong here , may be i can not use may logical operator at once or something else OR brackets under If condition are to be organised .
Please help!!
please help..
Last edited by Franklin52; 09-15-2009 at 06:21 AM..
Reason: Please use code tags!
I have a script that occasionally has a command here and there that fails and I would like to set my script up to just re run the command if the exit code is 1.
Is there a simple way to do that without if/thens or redirecting to the command again? (5 Replies)
Hi Guys,
I have requirement where if the script fails at a particular point, then the script should run from that particular point itslf..
could anyone help me out from this..
Thanks (5 Replies)
Hi!
I have this situation with 3 shellscripts.
One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1.
Script 1 in turn runs script 2 (import_catalogs_buyer.sh)
Sometimes, seemingly... (2 Replies)
I want to write a script that log all the failed processes and start the same process.
For that I have already write a script that gives all the PID
#!/bin/ksh
pid= `ps -ef |grep "ov" |grep -v "grep"| awk '{print $2}'`
echo $pid
if ;
then
echo "process is running"
else
echo... (4 Replies)
I need to list all the failed log in users as part of audit report. How can I do so in Linux to find all the audit log records and then upload to a table for future reference. I am using oracle 10g on Linux. Hope I will get a quick response from the experts.
Thanks in advance for the tips. (3 Replies)
Hi, I put a for loop in a script to eject backup tapes from the robot. The command echo' output goes to the log file without problem, but command vmchange's output does not go to the log file although it's working fine. It still displays on the screen. I've tried '2>&1 1>$log', but nothing changed.... (5 Replies)
Hi,
I have a Kshell script that is failed if i am using the -x option.
$ cat ListOfFiles.lst
\+DATA_DM01/pudwh/datafile/dw_billing_tts_1
\+DATA_DM01/pudwh/datafile/dw_billing_tts_2 ... (2 Replies)
Hi ,
I'd like to give you a little bit idea about my script which is used to get any generated file from remote server using ftp session then organized those file into directories based on their date ( at the end I supposed to have 1 months directories 20130401 20130402 ....20130430 ,... (27 Replies)
I'm using CentOS 7 and I would like to know of a way to read each line and search for a specific word. For example, if it finds the word "Fail" it sends it to a variable, and pipes it to a folder on the network.
What would be the best way in making this work in a Linux environment?
I wrote a... (1 Reply)
Discussion started by: SysAdminRialto
1 Replies
LEARN ABOUT DEBIAN
mousex::nativetraits::str
MouseX::NativeTraits::Str(3pm) User Contributed Perl Documentation MouseX::NativeTraits::Str(3pm)NAME
MouseX::NativeTraits::Str - Helper trait for Str attributes
SYNOPSIS
package MyHomePage;
use Mouse;
has 'text' => (
traits => ['String'],
is => 'rw',
isa => 'Str',
default => q{},
handles => {
add_text => 'append',
replace_text => 'replace',
},
);
my $page = MyHomePage->new();
$page->add_text("foo"); # same as $page->text($page->text . "foo");
DESCRIPTION
This module provides a simple string attribute, to which mutating string operations can be applied more easily (no need to make an lvalue
attribute metaclass or use temporary variables). Additional methods are provided for completion.
PROVIDED METHODS
These methods are implemented in MouseX::NativeTraits::MethodProvider::Str. It is important to note that all those methods do in place
modification of the value stored in the attribute.
inc Increments the value stored in this slot using the magical string autoincrement operator. Note that Perl doesn't provide analogous
behavior in "--", so "dec" is not available.
append($string)
Append a string, like ".=".
prepend($string)
Prepend a string.
replace($pattern, $replacement)
Performs a regexp substitution ("s" in perlop). A code references will be accepted for the replacement, causing the regexp to be
modified with a single "e". "/smxi" can be applied using the "qr" operator.
replace($pattern, $replacement)
Performs a regexp substitution ("s" in perlop) with the "g" flag. A code references will be accepted for the replacement, causing the
regexp to be modified with a single "e". "/smxi" can be applied using the "qr" operator.
match($pattern)
Like "replace" but without the replacement. Provided mostly for completeness.
chop
"chop" in perlfunc
chomp
"chomp" in perlfunc
clear
Sets the string to the empty string (not the value passed to "default").
length
"length" in perlfunc
substr
"substr" in perlfunc. We go to some lengths to match the different functionality based on "substr"'s arity.
METHODS
meta
method_provider_class
helper_type
SEE ALSO
MouseX::NativeTraits
perl v5.14.2 2011-12-04 MouseX::NativeTraits::Str(3pm)