Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You have "cut", so this is self education on sed ?.
You need to use the "s" command of sed - well documented. In this case I might be inclined to delete the @ and everything after it, but the choice is yours.
You have "cut", so this is self education on sed ?.
You need to use the "s" command of sed - well documented. In this case I might be inclined to delete the @ and everything after it, but the choice is yours.
Start here - go down to docs and get the info file; handy to have on your machine.
Also have a look at the 1liners file for ideas of how to do things with sed.
where file1 is the input file and file2 is the output file.
Thank you. It works.
I understand that s means substitute, g means global.
Your command means: Substitute characters in lines by lines with nothing which contains @ character, followed any character (.*), and than print matchings?
sed will process file line by line (in your case it is a substitution) and also will print the result. This is the default behavior, no need to match anything.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.