ID1=$(echo "xxxxx.yyy.zzzz.From-ABCD.To-XYZ.xxxxxx" | sed 's/.*\.From-\(.*\)\.To-.*/\1/')
ID2=$(echo "xxxxx.yyy.zzzz.From-ABCD.To-XYZ.xxxxxx" | sed 's/.*\.To-\(.*\)\..*/\1/')
OR
Code:
ID1=$(echo "xxxxx.yyy.zzzz.From-ABCD.To-XYZ.xxxxxx" | sed 's/.*\.From-\([^\.]*\).*/\1/')
ID2=$(echo "xxxxx.yyy.zzzz.From-ABCD.To-XYZ.xxxxxx" | sed 's/.*\.To-\([^\.]*\).*/\1/')
Last edited by anurag.singh; 12-16-2010 at 07:55 AM..
This User Gave Thanks to anurag.singh For This Post:
I have a string which contains following information:
<SZ.T><P ALIGN="CENTER"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="+3">Bundesregierung nimmt sich dicke Deutsche vor</FONT></P></SZ.T>
<SZ.UT><P ALIGN="CENTER"><FONT SIZE="+1"><I> Seehofer und Schmidt planen Kampagne gegen... (3 Replies)
I have some files in unix
ls -1
TMH.backend.tar.421E-03.Z
TMH.backend.tar.421E-04.Z
TMH.backend.tar.421E-05.Z
TMH.backend.tar.421E-06.Z
TMH.backend.tar.421E-07.Z
TMH.backend.tar.421E-08.Z
TMH.backend.tar.421E-08.Z.bak20081223164844
TMH.backend.tar.421E-09.Z... (1 Reply)
Hi,
I need to find out the files whcih contains date in YYYYMMDD in their name.
I don't know if I can use regex in side find.
Now I am using commad for the same purpose which is not full proof.
find . -name "**" -print
But I want then It should contain at lease 8 digit in their... (3 Replies)
Hello,
I want to check if directories exist with a regex expression
dir1=/temp/local/*/home (exists on file system)
dir2=/temp/server/*/logs (does not exist on file system)
I want to check if there are any directories with the above regex
Code:
if ];then
echo "Directory... (4 Replies)
How to do alternation using regular expressions in the 'find' command? Like say you want to find all files that do not match the names specifically "this" or "that" within a directory using regular expressions? (10 Replies)
I don't understand why the following simple command is not working:
find assign{1,2}Variations don't work, either:
find assign+
find assign?
ls assignAll I am trying to do is make an alias for running a C++ program of the name assign# or assign##. But the regular expressions aren't working. @_@... (27 Replies)
I'm trying to use regular expression arguments as variables. I have to surround the regular expression with double quotes or else it automatically expands that regular expression to whatever is in that directory.
Unfortunately when I run 'find' it further surrounds the double quotes with single... (6 Replies)
Hi All,
We have to copy some files from a source directory to a destination directory. We only have to copy the file if the filename is in a list of values.
We can use find command:
find . -type f -name '*_111.txt' -o -name '*_115.txt' ... -exec cp {} /tmp \;
But the list contains... (3 Replies)
Discussion started by: bartleby
3 Replies
LEARN ABOUT SUSE
find_member
FIND_MEMBER(8) System Manager's Manual FIND_MEMBER(8)NAME
find_member - Find all Mailman lists that a member's address is on
SYNOPSIS
find_member [options] regex [regex [...]]
OPTIONS -l listname, --listname=listname
Include only the named list in the search.
-x listname, --exclude=listname
Exclude the named list from the search.
-w, --owners
Search list owners as well as members.
-o file, --output=file
Append the alias setting recommendations to file, in addition to printing them to standard output.
-h, --help
Print a small help text and exit
regex A Python regular expression to match against.
NOTES
The interaction between -l and -x is as follows. If any -l option is given then only the named list will be included in the search. If
any -x option is given but no -l option is given, then all lists will be search except those specifically excluded.
Regular expression syntax is Perl5-like, using the Python re module. Complete specifications are at:
http://www.python.org/doc/current/lib/module-re.html
Address matches are case-insensitive, but case-preserved addresses are displayed.
AUTHOR
Author of Mailman is the Mailman Cabal, see http://www.list.org/ for information. This manpage is written by Tollef Fog Heen
<tfheen@debian.org> for Debian
SEE ALSO
Mailman documentation on http://www.list.org/ and in /usr/share/doc/mailman.
2001-03-10 FIND_MEMBER(8)