- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- using grep -v for files that END in .r
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 04:58 AM
01-14-2005 04:58 AM
using grep -v for files that END in .r
I'm piping my filelist thru grep -v "\.r" which seems to exclude the files that I want excluded -- files ENDING in .r e.g. oe100.r , but it is also excluding files that have .r in the middle, e.g. foo.r.enable.
I've tried grep -v "\.r\n" , but that isn't filtering our anything
-- Chad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 05:14 AM
01-14-2005 05:14 AM
Re: using grep -v for files that END in .r
grep -v "\.r$"
a try
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 05:16 AM
01-14-2005 05:16 AM
Re: using grep -v for files that END in .r
I believe you need the "$" to anchor it to the end of the line/filename.
Try:
grep -v "\.r$"
That should do it. If not I can find what will.
-dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 05:17 AM
01-14-2005 05:17 AM
Re: using grep -v for files that END in .r
grep -E -v '\.r$' should exclude the files for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 05:24 AM
01-14-2005 05:24 AM
Re: using grep -v for files that END in .r
Does the "-E" requirement vary from system to system? On my system it appears to be unnecessary.
-dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2005 06:10 AM
01-14-2005 06:10 AM
Re: using grep -v for files that END in .r
do ll /dir/![a-zA-Z]*.r
Anil