• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2270
  • Last Modified:

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

ls -lart | grep -i file

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

.../file103
.../file.32
.../file
.../file.dat

etc.

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.

0
ramble
Asked:
ramble
1 Solution
 
Kent OlsenData Warehouse Architect / DBACommented:

cat files | grep -i 'file$'


:)

0
 
rambleAuthor Commented:

TTHHHHHHank you...

That was driving me crazy.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now