I am trying to write an if statement in perl that will return "SUCCESS" if either of these conditions are true
a) if $changes is greater than 5 AND the $force flag is set to 1
OR
b) if $changes is greater than 0 AND $changes is less than 6
My script seems to be syntactically correct, however, whatever i set the $changes and $force values to, it always reports "success" .... is there something im doing wrong here ??
Hello,
So i have this file called /apps/turnout which looks like that of the contents of the /etc/shadow (but not exactly)
the file has a long list in it. basically, the contents of this file looks something similar to the following:
jajajajalala:D#$#AFVAdfda
lalabavisof:#%R@fafla#$... (3 Replies)
Hi there
We have boxes named server-sybase2, server-oracle1, etc etc
Does any body know how I can construct an if statement to say, if the hostname of the box contains the string "sybase" then do X ie
if
then
X
fi
any help would be greatly appreciated (6 Replies)
It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use ..
&& <statement> || <statement>
that perfectly replaces..
if ; then
<statement>
else
<statement>
fi
Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
I have following requirement.
Say, my text file contains following patterns
{2010501005|XXGpvertex|9|0|17|0|{|{30100001|XXparameter_set|@@@@{{30001002|XXparameter|!prototype_path|$AB_COMPONENTS/Sort/Sort.mpc|3|2|Pf$|@{0|}}
}}@0|@315000|78500|335000|99000|114000|87000|17|And the Sort|Ab... (8 Replies)
Hi All,
I am writing a perl script where I take 2 variables from the user as STDIN to scan the lines of a file to produce as output.
How can I do an IF loop to test this for example in the mock file
12 10
35 20
37 5
45 12if I take user input as 40 and 10, how can I get the output lines in... (3 Replies)
Hi,
I have a file look likes this :
--->start hir
Trace file: pudwh_ora_9998.trc
Sort options: fchela exeela
***************************************************************count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed... (3 Replies)
Hi everybody,
I'm sorry If I ask a silly question. I have a simple code like this
I have the following error:
Can anyone explain for me why I have this error, and how can I correct it?
Thanks in advance. (12 Replies)
Hi the below perl snippet will replace any three letter string in the beginning with a two letter string which is specified..but if i want to modfiy only certain characters for eg..
ABC - AB
CAB - AB
AAA - No Modifcations
1AB - AB
AB8 - AB
Whatever coming before or after of AB only have... (2 Replies)
Hi,
I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT LINUX
update-bootloader
UPDATE-BOOTLOADER(1) User Contributed Perl Documentation UPDATE-BOOTLOADER(1)NAME
update-bootloader - update/change bootloader configuration using
Bootloader::Tools perl module
SYNOPSIS
update-bootloader [operation] [options]
operation is one of --add, --remove or --refresh.
valid options are --help, --man, --image <file>, --initrd <file>, --xen-kernel <file>, --xen, --default, --previous, --name <string>,
--force, --force-default.
DESCRIPTION
update-bootloader will let you modify your bootloader configuration using Bootloader::Tools perl module.
OPERATIONS --add add an new image section. Needs a call to --refresh to take effect.
--remove
remove the specified image section. Needs a call to --refresh to take effect.
--refresh
activate the new config e.g. write boot loader to disk
PARAMETER --help Print a brief help message and exits.
--man Prints the manual page and exits.
--image file
specify path to kernel image
--initrd file
specify path to initrd file
--xen specify that you what to add a xen and not a regular image section
--xen-kernel file
specify that you what to add a xen section with a specific image. Implies --xen option.
--default
let the new section to be added be the default section if appropriate. Only allowed together with --add operation
--previous
set some usuable defaults for image, initrd and name when
--name string
specify the name of the section to be added/removed
--force dont complain, just do the right thing
--force-default
force the new section to be added to be the default section. Only allowed together with --add operation
perl v5.12.1 2010-04-22 UPDATE-BOOTLOADER(1)