LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-27-2012, 07:09 AM   #16
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120

Quote:
Originally Posted by fukawi1 View Post
... but i sometimes feel cut is under appreciated
Possibly true; in all the time I've used *nix (that'd be last millennium) I reckon I could count on one hand (maybe finger) the times I've used "cut".

But then it took me until reasonably recently to even look at awk ...
 
Old 04-27-2012, 11:38 AM   #17
Nermal
Member
 
Registered: Jan 2009
Distribution: Debian
Posts: 59
Blog Entries: 2

Rep: Reputation: 6
Thumbs up

**OFF TOPIC**
Quote:
Originally Posted by syg00 View Post
Possibly true; in all the time I've used *nix (that'd be last millennium) I reckon I could count on one hand (maybe finger) the times I've used "cut".

But then it took me until reasonably recently to even look at awk ...
I have has a love hate relationship with "awk" for over 25 years... Getting to grips with it is still on my todo list. It has l33t powers if you can spend the time figure it out and remember the syntax. There are some old skool *nix hacks at work who love to show it off.
 
Old 04-27-2012, 11:58 AM   #18
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
Grep and sort.
Code:
bash-4.1$ grep -o "MEDIA..." myfile | sort -u
MEDIA 03
MEDIA 07
MEDIA 11
MEDIA 12
MEDIA 13
MEDIA 14
 
Old 04-27-2012, 12:53 PM   #19
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
I forgot the UNAVAILABLE part.
Code:
bash-4.1$ grep "UNAVAILABLE$" myfile | grep -o "MEDIA..." | sort -u
MEDIA 03
MEDIA 07
MEDIA 11
MEDIA 13
MEDIA 14
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] unique command - variation on the theme danielbmartin Linux - Newbie 3 03-12-2011 10:27 AM
[SOLVED] MX Records / A Records / CNAME Records - Advice Please fusion1275 Linux - Newbie 15 01-18-2011 04:06 AM
[SOLVED] storing grep output to feed awk to retrieve entire records matching variable chargaff Programming 8 08-13-2010 06:10 AM
Getting only unique lines using grep.. sph90457 Linux - Newbie 6 07-05-2007 08:31 AM
1+0 records in how to disiable in DD command "1+0 records out" Kotresh Linux - Software 3 03-08-2007 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration