When searching through the output of more command how can I search for a phrase that includes spaces in between? When I search for a phrase like "typedef struct audiodev" it doesn't find the phrase in the file and I'm assuming this is because I need to express the space between the words with a certain symbol.
Asked
Active
Viewed 76 times
3 Answers
1
I'd use a regexp to match spaces:
egrep 'typedef\s+struct\s+audiodev' your_file
Here \s+
corresponds to one or more spaces

Sylvain Pineau
- 62,169
0
You can combine the command more with other tools like grep.
Open a console and try:
more yourfile | grep "typedef struct audiodev"

LnxSlck
- 12,256