[SOLVED] grep is kicking my butt...
by KGIII from LinuxQuestions.org on (#56QHP)
Alright, it has been years since I've needed to do this. I've read the man pages. I've tried countless combinations. I'm probably just mentally handicapped, as I know I used to be able to do this in my sleep.
I have a CSV file. Inside this CSV file are some words. Some of these words begin with "@". These words *may* also have a _ in them.
So, for example, there will be an @username or @user_name. There are no other name constructions.
How can I automagically extract all those usernames, preferably to a .txt file. I'm pretty sure grep can do this, but my efforts aren't working.
Yes, yes it has been years since I've needed to do this.


I have a CSV file. Inside this CSV file are some words. Some of these words begin with "@". These words *may* also have a _ in them.
So, for example, there will be an @username or @user_name. There are no other name constructions.
How can I automagically extract all those usernames, preferably to a .txt file. I'm pretty sure grep can do this, but my efforts aren't working.
Yes, yes it has been years since I've needed to do this.