nothing means no OUTPUT. Q: how can I limit the MIN and MAX length of a piped STRING? (MIN: x>=3 chars, MAX: x<=32 chars)INPUT: echo 12 | MAGICOUTPUT: nothingINPUT: echo 123 | MAGICOUTPUT: 123INPUT: echo 123456789012345678901234567890123 | MAGICOUTPUT: nothingINPUT: echo 12345678901234567890123456789012 | MAGICOUTPUT: 12345678901234567890123456789012
How to limit MAX an MIN length of a string?
sed;awk;perl
This should do the job:echo 123 | awk 'length >= 3 && length <= 32'If you pipe multiple lines to it, it will print lines with between 3 and 32 characters.