Two of the other million ways to do this are:<p><pre><code>    perl -ne &#x27;print if length()&lt;1024&#x27;
    awk &#x27;length($0)&lt;1024&#x27;
</code></pre>
Note that if the last line is not newline terminated then the sll and the awk solutions will add a newline, while the perl one will not.