bash - Find words that are 6 characters in length -
i have file.txt
fhadja ksjfskdasd adasda sada s adasaaa i need extract words 6 character length there.
example of need obtain result:
fhadja adasda thank you.
you can use:
grep -e '^.{6}$' file fhadja adasda or using awk:
awk 'length($0)==6' file fhadja adasda or using sed:
sed -rn '/^.{6}$/p' file fhadja adasda
Comments
Post a Comment