0

I want to search only in my files, contains only .txt and .c

This doesn't work for me
ls | grep .txt | grep .c

I want the ls and grep .txt, .c

??Thanks??

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by L7Sqr
0

From your question above I only managed to understand that, you want to display all the files with '.c' and '.txt' extensions in the current directory . Am I right?
if so then you can do like this in bash:

ls *.c *.txt

i.e ls filetypes. '*' is just a wildcard specifier.
If this is not what yo're looking for then you may have to elaborate your question.

Edited by D33wakar: n/a

0

From your question above I only managed to understand that, you want to display all the files with '.c' and '.txt' extensions in the current directory . Am I right?
if so then you can do like this in bash:

ls *.c *.txt

i.e ls filetypes. '*' is just a wildcard specifier.
If this is not what yo're looking for then you may have to elaborate your question.

Yeah ! it works thanks! sorry for my spelling! =S

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.