On Mon, 13 Mar 2006, [EMAIL PROTECTED] wrote:
I have looked through marc's user creation script and I am trying to make some
changes to it.
The problem I have is with the two lines:
sed -e '[EMAIL PROTECTED]@@@'
sed -e '[EMAIL PROTECTED]@[a-A-z0-9.]*@@'
What does "@" mean in terms of sed? My google searching has come up with
Nothing in particular, but the first character after the 's'-command is
the delimiter, the usual delimiter is a slash, e.g.:
sed -e 's/[a-zA-Z0-9]*@//'
sed -e 's/@[a-A-z0-9.]*//'
In that case you need not quote the Ad-Sign.
nothing even remotly usefull on this topic. As I understand it: sed -e
'[EMAIL PROTECTED]@@@' [a-zA-Z0-9]*\@ means (roughly) search for any
string starting with any upper case letter, lower case letter, or digit.
That string is of uknown length, but is terminated by the first @ sign
we find. I am ok with this part it is the @ at the begining, and the @@
The 's' is "substitude" and has two arguments, which are delimited from the
command character and from themselves with the character following the
's'-command immediately, hence, you can read the line as:
substitude the first occurence of [a-zA-Z0-9]*@ by nothing.
at the end that I don't understand. [EMAIL PROTECTED] means (roughly)
search for any string starting with an @, and followed by any number of
upper case letter, lower case letter, or digits. That string is of
uknown length, but is terminated by the first "." sign we find. I am ok
Nope, the second sample includes the dot into the brackets, hence, it
does NOT stop at the first dot, but includes it into the range.
with this part it is the @ at the begining, and the @@ at the end that I
don't understand. Also it would seem that this would chop off the .com
part of the domain.
The first command strips off the part left of and the Ad-Sign itself,
hence, you get the domain part.
The second command strips of the Ad-Sign and the part to the right of it,
hence, you get the local part of the address.
I'm not sure about the implications to use the strict range, I'd use
s/[EMAIL PROTECTED]@//
s/@.*//
Because I assume that the names one pipes in are well-structured.
Bye,
--
Steffen Kaiser
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
unattended-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unattended-devel