Hello,
from the gnu sed manual, I should be able to do this:
`\(REGEXP\)'
Groups the inner REGEXP as a whole, this is used to:
* Apply postfix operators, like `\(abcd\)*': this will search
for zero or more whole sequences of `abcd', while `abcd*'
... (3 Replies)
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)
Why is only hello3 being printed? There must be some kind of syntax problem because the file list definitely includes all the file extensions line by line.
#!/bin/bash
find '/home/myuser/folder/' -name '*.c' -type f | while read F
do
if ] # if the file name ends in .txt.c
then
... (6 Replies)
I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly:
if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Hi,
I'm trying to validate if a string matches a regular expression, but it is not working. Am I missing something? Do I need to scape any of the characters?
if echo 'en-GB' | egrep '({1,8})(-{1,8})*' >/dev/null; then
echo Valid value
fi
Thanks in advance (6 Replies)
Hi ,
I am trying to extract contents of a file between specified time stamp. but it does not seem to work. i am trying to extract output of /var/adm/messages between 15:00:00 to 15:23:59 .
i have tried two regex the first one seems to kind of work. it displays some output. the second one is... (13 Replies)
I have a number of files that I pass through awk/gsub.
I believe to have found a working regex and on 'test bed' sites it matches, however within gsub it does not.
Examples:
Initial data:
/Volumes/Daniel/Public/Drop Box/_Hellsing_Ultimate_OVA_-_10_.mkv
gsub & regex:
gsub("\]+\]",""
... (4 Replies)
Hello to all,
The Regex below is supposed to match all strings except RR45. I've tested in regex101.com and it works, butwhen I try to use it with the perl command below I get the error shown.
Regex=(?<=^|RR45)(?!RR45).+?(?=RR45|$)
How to fix this? I'm using Cygwin.
$ echo... (9 Replies)
I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works:
LOCAL_CONFIG
#
Kcheckaddress regex -a@MATCH
+<@+?\.++?\.(us|info|to|br|bid|cn|ru)
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies
LEARN ABOUT DEBIAN
cvsconnect
CVSCONNECT(1)CVSCONNECT(1)NAME
cvsconnect - CVS connection minimizer
SYNOPSIS
cvsconnect cvsroot [command-to-run ...]
DESCRIPTION
CVSconnect enables you to do multiple CVS operations on single network connection. CVSconnect sets up special environment using
$CVSRSH/$CVSROOT for the command line CVS client. In the environment, the command line CVS client reuses a network connection.
CVSconnect is especially designed to use with CVSsuck. And CVSconnect (or similar) will be integrated to a future version of CVSsuck.
However, it is planned that CVSsuck directly connects to a cvs server without cvs command.
EXAMPLES
cvsconnect $HOME/.cvsroot
BUGS
o The global option -z for compression cannot be used. If you use SSH via ext method, you can use compression by SSH instead.
o CVS client must be run at a time. Running two or more clients at a same time will make a trouble. (will be fixed in future release.)
o Some static variables in a CVS server may confuse you. It's a CVS bug. Report it to CVS developer :-).
o Command line CVS client must request `Root' first. Don't mind. There is no implementation which violates this assumption, however I
know. At least, CVS-1.10 and CVS-1.11 should work.
NOTES
o When CVS command is failed, CVSconnect automatically re-run the command with reconnected connection when CVS command is failed.
Especially the failure is caused by a long running CVS-1.10 server. Since CVS-1.10 doesn't close some file descriptors, a long running
CVS server will exceed a limit of file descriptors.
o /bin/sh should be POSIX sh because this script uses ${parameter#pattern}, etc. If your /bin/sh is ancient Bourne shell, use ksh or
bash.
SEE ALSO cvs(1), cvssuck(1).
AUTHOR
This manpage is written by Piotr Roszatycki <dexter@debian.org> for Debian distribution and can be freely redistributed.
Debian 2011-08-30 CVSCONNECT(1)