Login
Search   Moderators Wanted: If you're interested please send your portfolio to info[at]itechforums.com
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 2
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2010, 05:16 PM
Zatara Zatara is offline
Junior Member
 
Join Date: Mar 2010
Posts: 2
Default

In UNIX/LINUX, how can I find words that neither begin nor end with the letter a...


In UNIX/LINUX, how can I find words that neither begin nor end with the letter a...

...using grep command? I know how to show the words that begin with a but I don't know how to do the opposite way which is neither begin no end with a


Appreciate your efforts...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2  
Old 03-10-2010, 05:19 PM
Bobdarshy Bobdarshy is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Default

A negation in regex can be done via [^a] (a carrot inside square brackets)
I believe the full regex you would desire would be: [^a].*[^a].

A simple test of this regex in my grep seemed to work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
In UNIX/LINUX, how can I find words that contain only the letters of my first Zatara UNIX 1 03-09-2010 04:24 PM
In UNIX/LINUX, I am trying to use the grip command to find words with MAQ UNIX 0 03-08-2010 09:11 AM
How do I write a script in Unix that counts how many different words are there in a Darren L UNIX 0 05-01-2009 02:56 PM
Where can I find 'Terminal' to run Linux/Unix? mojo jojo UNIX 0 11-08-2008 06:49 AM
how do i find a template of a letter of intent or a letter of representation.? harold b Web Templates 0 07-12-2008 09:58 PM

Your Ad Here

All times are GMT. The time now is 11:49 AM.