URL: <http://savannah.gnu.org/bugs/?49147>
Summary: Tab character replaced by question mark ("?") when locate outputs to tty Project: findutils Submitted by: yuvals Submitted on: Wed 21 Sep 2016 11:13:23 AM GMT Category: locate Severity: 3 - Normal Item Group: Wrong result Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: 4.6.0 Fixed Release: None _______________________________________________________ Details: Version: 4.6.0 What I am trying to do: I added size information after a tab character at the end of each locatedb entry (this allows me to use locate to find files by size). The exact command lines I was using: (up to absolute paths) $ mkdir test-locatedb && cd test-locatedb $ touch a b c d e f g $ du -a | awk -v 'OFS=\t' '{print $2,$1}' | /path/to/frcode > test.locatedb $ /path/to/locate --database=test.locatedb a ./test.locatedb?1 ./a?1 $ locate --database=test.locatedb a | cat ./a 1 ./test.locatedb 1 $ /path/to/locate --version locate (GNU findutils) 4.6.0 ... What I expected to happen: I expect the tab character to be displayed when `locate` outputs results to the terminal. What did happen: `locate` replaces tabs with question marks ("?") More information: Output piped via `cat` should be identical to direct terminal output. Alternatively, the behavior should be documented in the `man` page. Relevant code: * qmark.c <http://git.savannah.gnu.org/cgit/findutils.git/tree/lib/qmark.c?h=v4.6.0&id=992a6b62ab8061531dc0ad40325b8e4c222fce66> * printquoted.c <http://git.savannah.gnu.org/cgit/findutils.git/tree/lib/printquoted.c?h=v4.6.0&id=992a6b62ab8061531dc0ad40325b8e4c222fce66> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?49147> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/