LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-13-2022, 12:38 AM   #1
solidbulk
LQ Newbie
 
Registered: Sep 2020
Posts: 23

Rep: Reputation: Disabled
grep files without extension


Hi ,

I am having trouble grepping through files in the directory I am working in. The files do not have an extension.

Last edited by solidbulk; 10-13-2022 at 12:41 AM. Reason: mistake .
 
Old 10-13-2022, 12:49 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,540
Blog Entries: 3

Rep: Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410
There aren't extensions, just file names. With that in mind, what specifically have you tried and what is not right about it?

Are there many files and you wish to grep only some of them?
 
Old 10-13-2022, 02:18 AM   #3
solidbulk
LQ Newbie
 
Registered: Sep 2020
Posts: 23

Original Poster
Rep: Reputation: Disabled
i am in the directory , I am trying grep 84747 *.* .

There are many files.

I should have been doing grep 84747 *
 
1 members found this post helpful.
Old 10-13-2022, 03:54 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,540
Blog Entries: 3

Rep: Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410Reputation: 3410
Thanks. See also "man 7 glob" for how those symbols behave in the shell.
 
2 members found this post helpful.
Old 10-13-2022, 11:20 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,736
Blog Entries: 13

Rep: Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784Reputation: 4784
Quote:
Originally Posted by solidbulk View Post
i am in the directory , I am trying grep 84747 *.* .

There are many files.

I should have been doing grep 84747 *
Yep. Even though I didn't say this, I agree that it would search both files with and without extensions.
 
  


Reply

Tags
extension, grep


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
Requesting terminal command that (recursively) totals size per file extension and number of files per extension triciasurfer Linux - General 8 08-06-2020 08:08 PM
Creating an alias in ksh that uses grep and includes 'grep -v grep' doug248 Linux - Newbie 2 08-05-2012 03:07 PM
[Xlib: extension "Generic Event Extension" missing on display] nomachine/x11 forward digger86 Linux - Software 0 05-21-2010 02:29 AM
Magento Install: dom extension and mcrypt extension mjdb Linux - Newbie 0 02-21-2009 03:58 AM
Linux file extension vs Dos file Extension? manaa Linux - Newbie 6 02-12-2009 05:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:56 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
Open Source Consulting | Domain Registration