My Tech Notes
Bash script: extract substring from brackets
To extract substring from brackets:
Name: [John Simith].
echo $str | cut -d "[" -f2 | cut -d "]" -f1
see also
stackoverflow: extract string from brackets
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment