Trying to figure out how to write a command across multiple lines because the real one is way to long for a prompt (4200 chars), so I tried this example:
Made a test file that contained the following 3 lines:
some thing
some
thing
When I do this grep:grep "some thing" test
I get the expected result of:some thing
But when I do this grep: grep "some \
thing" test
I get the unexpected result of:
some thing
thing
Almost as if it ran the grep twice, once for “some ” and once for “thing”. Is there any way to properly use the \ to combine the 2 to where the result is like the first grep?
So it looks like this did it:
grep "some \|thing" test.txtProduced:
some thingSame as:
grep "some thing" test.txt