How to Delete lines that contain more than three dots in a email before @ character using SED?
sed '/(.*..*){4,}/d'
The above command mentioned recognizes every DOT in the line...
It is recognizing DOTS after @ sign too.
For example, even this is shown in the result: ryisan@Sariyer.Cc.itu.Edu.tr
Can you help me modify the above command in such a way that only the LEFT side of @ it counts the Multiple DOTS more than 3 and ignores the DOTS after the character @ to right side of the email?
Eg:
fgtc21_pk@yahoo.com
bhchemitex@chemitex.com
hjcindysun48@hotmail.com
hhconsult_sa.jan.2020@yahoo.com
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
ryisan@Sariyer.Cc.itu.Edu.tr
I want the following lines with multiple Dots (3 or more dots) at the LEFT SIDE of @ Character to be only recognizers and deleted from the file.
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
Any experts, plz suggest me how to modify the above SED command.... Thanks
linux command-line sed
add a comment |
sed '/(.*..*){4,}/d'
The above command mentioned recognizes every DOT in the line...
It is recognizing DOTS after @ sign too.
For example, even this is shown in the result: ryisan@Sariyer.Cc.itu.Edu.tr
Can you help me modify the above command in such a way that only the LEFT side of @ it counts the Multiple DOTS more than 3 and ignores the DOTS after the character @ to right side of the email?
Eg:
fgtc21_pk@yahoo.com
bhchemitex@chemitex.com
hjcindysun48@hotmail.com
hhconsult_sa.jan.2020@yahoo.com
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
ryisan@Sariyer.Cc.itu.Edu.tr
I want the following lines with multiple Dots (3 or more dots) at the LEFT SIDE of @ Character to be only recognizers and deleted from the file.
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
Any experts, plz suggest me how to modify the above SED command.... Thanks
linux command-line sed
add a comment |
sed '/(.*..*){4,}/d'
The above command mentioned recognizes every DOT in the line...
It is recognizing DOTS after @ sign too.
For example, even this is shown in the result: ryisan@Sariyer.Cc.itu.Edu.tr
Can you help me modify the above command in such a way that only the LEFT side of @ it counts the Multiple DOTS more than 3 and ignores the DOTS after the character @ to right side of the email?
Eg:
fgtc21_pk@yahoo.com
bhchemitex@chemitex.com
hjcindysun48@hotmail.com
hhconsult_sa.jan.2020@yahoo.com
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
ryisan@Sariyer.Cc.itu.Edu.tr
I want the following lines with multiple Dots (3 or more dots) at the LEFT SIDE of @ Character to be only recognizers and deleted from the file.
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
Any experts, plz suggest me how to modify the above SED command.... Thanks
linux command-line sed
sed '/(.*..*){4,}/d'
The above command mentioned recognizes every DOT in the line...
It is recognizing DOTS after @ sign too.
For example, even this is shown in the result: ryisan@Sariyer.Cc.itu.Edu.tr
Can you help me modify the above command in such a way that only the LEFT side of @ it counts the Multiple DOTS more than 3 and ignores the DOTS after the character @ to right side of the email?
Eg:
fgtc21_pk@yahoo.com
bhchemitex@chemitex.com
hjcindysun48@hotmail.com
hhconsult_sa.jan.2020@yahoo.com
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
ryisan@Sariyer.Cc.itu.Edu.tr
I want the following lines with multiple Dots (3 or more dots) at the LEFT SIDE of @ Character to be only recognizers and deleted from the file.
s.ing.song.lan.g.ju.n.55.l@gmail.com
VB.t.o.t.all.y.f.it.s.19.99@yahoo.com
a.lice.i.n.wonde.r.lnd.2.1.f@dkg.com
Any experts, plz suggest me how to modify the above SED command.... Thanks
linux command-line sed
linux command-line sed
asked Jan 23 at 5:53
Joney WalkerJoney Walker
235
235
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I'm not an expert but, to delete only the 4 dots (or more) patterns at the left side of @
you can simply add @.*
at the end of your expression:
sed '/(.*..*){4,}@.*/d'
It means to delete the 4 dots (or more) patterns at the left side of the @
regardless what characters are at the right side.
Perfect... Thank you. That did that trick..
– Joney Walker
Jan 23 at 6:38
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1397293%2fhow-to-delete-lines-that-contain-more-than-three-dots-in-a-email-before-charac%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm not an expert but, to delete only the 4 dots (or more) patterns at the left side of @
you can simply add @.*
at the end of your expression:
sed '/(.*..*){4,}@.*/d'
It means to delete the 4 dots (or more) patterns at the left side of the @
regardless what characters are at the right side.
Perfect... Thank you. That did that trick..
– Joney Walker
Jan 23 at 6:38
add a comment |
I'm not an expert but, to delete only the 4 dots (or more) patterns at the left side of @
you can simply add @.*
at the end of your expression:
sed '/(.*..*){4,}@.*/d'
It means to delete the 4 dots (or more) patterns at the left side of the @
regardless what characters are at the right side.
Perfect... Thank you. That did that trick..
– Joney Walker
Jan 23 at 6:38
add a comment |
I'm not an expert but, to delete only the 4 dots (or more) patterns at the left side of @
you can simply add @.*
at the end of your expression:
sed '/(.*..*){4,}@.*/d'
It means to delete the 4 dots (or more) patterns at the left side of the @
regardless what characters are at the right side.
I'm not an expert but, to delete only the 4 dots (or more) patterns at the left side of @
you can simply add @.*
at the end of your expression:
sed '/(.*..*){4,}@.*/d'
It means to delete the 4 dots (or more) patterns at the left side of the @
regardless what characters are at the right side.
answered Jan 23 at 6:23
YoricYoric
3196
3196
Perfect... Thank you. That did that trick..
– Joney Walker
Jan 23 at 6:38
add a comment |
Perfect... Thank you. That did that trick..
– Joney Walker
Jan 23 at 6:38
Perfect... Thank you. That did that trick..
– Joney Walker
Jan 23 at 6:38
Perfect... Thank you. That did that trick..
– Joney Walker
Jan 23 at 6:38
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1397293%2fhow-to-delete-lines-that-contain-more-than-three-dots-in-a-email-before-charac%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown