ls -lart | grep -i file (then EOL)

Posted on 2005-03-03
Medium Priority
Last Modified: 2008-03-03
ls -lart | grep -i file

let's say I have 100's of files that end in the file path:



I'm wanting to look for just "file<end of line>", something like this:

ls -lart | grep -i file\013  (use, like a character code for the EOF).

I like to run a command:
find . >files

to get a list of files in a directory - and do a search on those files...

cat files | grep -i \\/file\013

I just need to know how include the eol in my search.  I've used it before, but I forgot.

Question by:ramble
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 46

Accepted Solution

Kent Olsen earned 200 total points
ID: 13454500

cat files | grep -i 'file$'



Author Comment

ID: 13455585

TTHHHHHHank you...

That was driving me crazy.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question