12-02-2008
Yeah, =~ is a new operator. It matches like a regexp anywhere in
the string, use globbing instead, substitute it by:
[[ $a = *\<* ]]
HTH Chris
10 More Discussions You Might Find Interesting
1. Solaris
Dear all,
How to upgrade bash's version? which way should be easy between remove the old version first and upgrade it or upgrade without remove?
Please, tell me how to upgrade step by step because I'm newbie
thank in advance (4 Replies)
Discussion started by: unitipon
4 Replies
2. AIX
On AIX platform we are having Weblogic 8.1 as the middleware for an application.
The application is deployed in Weblogic on AIX platform and the server is having 2 dedicated listening ports for any incoming requests.
Output for netstat -an command for the port 30001 is as follows:-
tcp4... (7 Replies)
Discussion started by: subharai
7 Replies
3. Shell Programming and Scripting
Hi there, I need to test that a variable ($VAR) matches a regex mask in BASH. I have the exact thing working in perl (below), but could somebody advise me how i would do the same in BASH ? do i need to use something like egrep ?
#!/bin/perl -w
my $VAR = "some value";
if ( $VAR =~... (4 Replies)
Discussion started by: rethink
4 Replies
4. Solaris
hi this is hrushi i have issue regarding solaris(9 version)
when i telnet from solaris to linux machine it displaying message like connection closed by forine host ...when i telnet from linux to solaris its working fine ...help me its urgent and i'm new to solaris 9 (2 Replies)
Discussion started by: ghrushi84
2 Replies
5. Shell Programming and Scripting
Hi guys,
I need for the bash code below a little bit help: cat script.sh
#!/bin/bash
5_MYVALUE="test"
echo "$5_MYVALUE"
If I try to run the script, got follow failure:
./script.sh
./script.sh: line 4: 5_MYVALUE=test: command not found
_MYVALUE
My questions are how... (4 Replies)
Discussion started by: research3
4 Replies
6. Solaris
Hi Friends,
I am new in solaris. yesterday i installed solaris in VM. now while installing weblogic setup(.bin) its giving me Invalid argument error.
after some google i have two points in my mind
1) i am using solaris on intel machine. thats why i am facing this issue. If answer is yes... (3 Replies)
Discussion started by: Vishal Baghla
3 Replies
7. UNIX for Dummies Questions & Answers
this is proving to be a real pain to set up. i recently installed red hat 5.10 desktop version.
install went well. i've registered my system, but i cant seem to yum install simple packages.
i can install some packages, but many others i cant. for instance, i cant do a:
yum install php
... (2 Replies)
Discussion started by: SkySmart
2 Replies
8. Linux
Hi all,
currently I'm facing a issue in linking a .so file.
In my build machine, I've libcrypto.so.6 and there is a softlink as libcrypto.so.
In my make file I'm trying to link to the lib using -L -lcrypto and it is success and created my test.exe.
When I copy this test.exe to other... (4 Replies)
Discussion started by: vijkrr
4 Replies
9. Shell Programming and Scripting
Hi,
I have made a snake game on below bash version. But it is not backward compatible. Can someone suggest a version which is most commonly used and
is backward compatible so that i can change my code and share again?
I have attached the game script. If someone can run it please also suggest... (5 Replies)
Discussion started by: amit14august
5 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am new in bash scripting. In my work, I provide support to several users and when I connect to their computers I use the same admin and password, so I am trying to create a script that will only ask me for the IP address and then connect to the computer without having me to type the user... (5 Replies)
Discussion started by: arcoa05
5 Replies
LEARN ABOUT MOJAVE
ppi::token::regexp
PPI::Token::Regexp(3) User Contributed Perl Documentation PPI::Token::Regexp(3)
NAME
PPI::Token::Regexp - Regular expression abstract base class
INHERITANCE
PPI::Token::Regexp
isa PPI::Token
isa PPI::Element
DESCRIPTION
The "PPI::Token::Regexp" class is never instantiated, and simply provides a common abstract base class for the three regular expression
classes. These being:
m// - PPI::Token::Regexp::Match
s/// - PPI::Token::Regexp::Substitute
tr/// - PPI::Token::Regexp::Transliterate
The names are hopefully obvious enough not to have to explain what each class is. See their pages for more details.
To save some confusion, it's worth pointing out here that "qr//" is not a regular expression (which PPI takes to mean something that will
actually examine or modify a string), but rather a quote-like operator that acts as a constructor for compiled Regexp objects.
METHODS
The following methods are inherited by this class' offspring:
get_match_string
The "get_match_string" method returns the portion of the regexp that performs the match.
get_substitute_string
The "get_substitute_string" method returns the portion of the regexp that is substituted for the match, if any. If the regexp does not
substitute, "undef" is returned.
get_modifiers
The "get_modifiers" method returns the modifiers of the regexp.
get_delimiters
The "get_delimiters" method returns the delimiters of the regexp as an array. The first element is the delimiters of the match string, and
the second element (if any) is the delimiters of the substitute string (if any).
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.18.2 2011-02-25 PPI::Token::Regexp(3)