This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
strings: \t special but \n not?
- From: Erik Ackermann <kurterikackermann at gmail dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Wed, 18 Jun 2014 17:17:32 -0700
- Subject: strings: \t special but \n not?
- Authentication-results: sourceware.org; auth=none
I have noticed that \n is treated differently than \t. Consider
echo -e "HELLO\nW" | strings
echo -e "HELLO\tW" | strings
The first will print "HELLO" and the second "HELLO\tW"
I have noticed in the code that in addition to checking ISPRINT(c), c
== '\t' is also special cased as being a "string". Why is \t special
and not other whitespace?
Thanks,
Erik