I'm attempting to grep for lines formatted like this:
["Item","foo",
Where whatever goes in the place of foo is from an array named stuff. The command I have here an example is:
grep -e '^\[\"Item\",\"$stuff[0]\",'
Any suggestions as to why this isn't working?
---------- Post updated at 05:03 PM ---------- Previous update was at 04:17 PM ----------
This was my solution:
grep -e '^\[\"Item\",\"'$stuff[0]'\",'
It's hard to read, but basically I have $stuff[0] outside of the two regex strings. So basically I'm searching like: <["Item",">foo<",> (this isn't an actual notation it's just showing how I'm separately grep-ing for each part of the line.
Please do not ask new questions in existing threads. Unless you have new information to a particular problem, please create a new thread in the appropriate forum.
Also, please search the forums first, as it might be that someone has already posted an answer for a similar problem.