For example:
To obtain all values within quotes from the output of a jstack command you could
./jstack <pid> |perl -lne 'print $1 if (/"(.*)"/)'
and if you wanted a count of how many quoted values there are
./jstack 23545 |perl -lne 'print $1 if (/"(.*)"/)' |wc -l
No comments:
Post a Comment