I have a file which is delimited with ^&^
. Here is a snippet from the file.
XML_DOC^&^NUM^&^GEO_REF_ID^&^GRL
I need to perform some operations based on the delimiter. How can I check if the file has ^&^
?
I have tried the below code but that did not work.
if grep -q "^&^" "local/filename.txt"; then
echo "has"
else
echo "has not "
fi
Any help is much appreciated.