I am new to forums and Id like to ask a question. I hope this is the right place to ask that question.
Im writing some scripts in CentOS 7 and I need some help with regular expressions. I have read a lot but my tests gone bad.
Ive got output copied into text file
What I want is to get the red strings into array, no matter how many similar lines I get.BRIDGE-MIB::dot1dTpFdbPort.'..L2G.' = INTEGER: 29
BRIDGE-MIB::dot1dTpFdbPort.'..$..F' = INTEGER: 3
...
I have tried something like this:
Code: Select all
array=($(cat test.txt | grep -o -E \'[!-~]{6}\' ))
Please help me, Thank You