Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

how to search a special file in shell?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
xiaota
Posts: 23
Joined: 2015-12-30 08:34

how to search a special file in shell?

#1 Post by xiaota »

I have touched a file named "mm$" in current directory ,I want to search it in regular expression. How to get it ?

I have tried this " ls | grep mm\$ " command ,but nothing get from the current directory .

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: how to search a special file in shell?

#2 Post by dilberts_left_nut »

Code: Select all

$ ls | grep 'mm\$'
mm$
AdrianTM wrote:There's no hacker in my grandma...

xiaota
Posts: 23
Joined: 2015-12-30 08:34

Re: how to search a special file in shell?

#3 Post by xiaota »

Thank you

xiaota
Posts: 23
Joined: 2015-12-30 08:34

Re: how to search a special file in shell?

#4 Post by xiaota »

Much more ,what's the differences between double quote and single quote in regular expression ? Are there any books for suggestion?

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: how to search a special file in shell?

#5 Post by dilberts_left_nut »

AdrianTM wrote:There's no hacker in my grandma...

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: how to search a special file in shell?

#6 Post by Head_on_a_Stick »

deadbang

Post Reply