... your suggestion does at least make the statement work up to the value 9, but not beyond ...
In addition to Scrutinizer's response, you may want to recall that string comparison is ASCII-value comparison.
Which is why these scripts behave the way they do:
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)