Im using the
grep command In a simple script, the problem however Is that the string which the grep command Is searching for includes a square bracket character:
After some research, i have found that the square bracket
[ character is in fact used as a function for optimising the grep commands output through a process called "
pipelining" (Although don't quote me on It as Im not sure).
How do I search for a string with a '[' character in it without invoking a pipelining function within grep?
The script Is searching a system log for the string
su[. This Is my current malfunctioning command:
tail -1 system.log | grep " su[", however It will not work due to the square bracket at the end, returning the error:
grep: brackets ([ ]) not balanced.
Thanks In Advance.