[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #49147] Tab character replaced by question mark ("?") when locate o

From: Yuval S
Subject: [bug #49147] Tab character replaced by question mark ("?") when locate outputs to tty
Date: Wed, 21 Sep 2016 11:13:25 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2868.0 Safari/537.36


                 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



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
$ 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
* printquoted.c


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]