Hello All,
I am here again scratching my head on pattern selection with special characters.
I have a large file having around 200 entries and i have to select a single line based on a pattern.
I am able to do that:
Code:
cat mytest.txt | awk -F: '/myregex/ { print $2}'
Output is as below:
//mytestserver.bon.com
now i have to split this output and pass only
to a variable
i am trying this sed command ..but somehow this is not solving the purpose.
Any help where i am going wrong
cat mytest.txt | awk -F: '/myregex/ { print $2}' | sed 's/^[/ ^.]//'
Thanks
Usha