Why necessarily " " ?
I was looking for the lines that begin with MANPATH (not MANPATH_MAP!) in the file man.conf.When I entered:
Code:
grep ^\<MANPATH\> /usr/lib/man.conf Code:
grep "^\<MANPATH\>" /usr/lib/man.conf Thanks! |
The shell will interpret special characters unless you escape them (with \) or enclose them in quotes.
For example, the command: Code:
echo * While the command: Code:
echo "*" You should look at the bash manpage. There is a section about this called "quoting". |
Yes, I know the quoting problem, but this is what I don't understand:
Code:
grep ^MANPATH /usr/lib/man.conf Code:
grep "^MANPATH" /usr/lib/man.conf |
If you try:
Code:
echo ^MANPATH Code:
^MANPATH In your first post, you were using \> The > is a special character (used with pipes). The shell will see the \ and assume that you meant to escape the > character, not that you're using grep regular expression syntax. See for yourself using the arguments for grep from your first post. Try: Code:
echo ^\<MANPATH\> Code:
echo "^\<MANPATH\>" |
What can I say...A big "Thanks"!
|
you\'re\ welcome
:) |
All times are GMT -5. The time now is 08:38 PM. |