Hi,
Suppose I have the following lines in a file:
TOM {
1
2
3
4
5
}
David {
6
7
8
9
10
}
I want to search for TOM and print out all the lines till I get the curly brace. So my output will be:
Tom {
1
2
3
4
5
}
I can do an awk but when I put that in a perl script I get errors:
> awk '/Tom/,/\}|\^$/'
Any help will be appreciated.
Thanks,
Omar.
Suppose I have the following lines in a file:
TOM {
1
2
3
4
5
}
David {
6
7
8
9
10
}
I want to search for TOM and print out all the lines till I get the curly brace. So my output will be:
Tom {
1
2
3
4
5
}
I can do an awk but when I put that in a perl script I get errors:
> awk '/Tom/,/\}|\^$/'
Any help will be appreciated.
Thanks,
Omar.