linux - Searching all files that begin with 's' and end with '.conf' with grep -


using grep command search string ip in files beginning s (case sensitive) , ending .conf in /etc directory. redirect output /usr/local/thirdrock/grep1.txt.

you should 8 lines of output.

this question i've been given practical exam review, far have

grep "ip" s*.conf /etc 

but returned "no such file or directory".

my question how search in files beginning s , ending .conf in /etc directory.

grep "ip" s*.conf /etc searching string "ip" in files in current directory matching s*.conf , "file" /etc, directory.

grep "ip" /etc/s*.conf should want.

you can redirect standard output using >, wasn't part of question, won't spoil it.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -