LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-19-2013, 11:49 PM   #16
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135

Have a look at the below regex guide:

http://www.grymoire.com/Unix/Regular.html
 
Old 05-20-2013, 01:35 PM   #17
asherbarasher
LQ Newbie
 
Registered: May 2013
Distribution: centos 6.x
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by divyashree View Post
This should work definitely as you want
with grep:

Code:
ls  |egrep  '^..z.*$'
with sed:
Code:
ls  |sed  -n '/^..z.*$/p'
Yes, it did the trick. Thank you.

Thank you all for your replies. Now i have lot of reading on my evenings :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] simple regex problem doughyi8u Programming 4 01-08-2012 08:55 PM
[SOLVED] differences between shell regex and php regex and perl regex and javascript and mysql golden_boy615 Linux - General 2 04-19-2011 02:10 AM
[SOLVED] What's Wrong with the RegEx [Simple] thund3rstruck Programming 2 04-04-2011 12:04 PM
simple regex not so simple (perl) ludeKing Programming 5 03-02-2005 03:29 AM
simple perl and regex phlx Programming 6 12-03-2004 04:01 PM

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

All times are GMT -5. The time now is 08:18 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration