printf and backspace

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.
Now, when I run a command like this:
find -maxdepth 1 -type d -fprintf output "%pbn"
I get the following in output (using vim and pretty much any text editor):
.^H
./directory-1^H
./directory-2^H
./directory-3^H
I understand that ^H is the backspace character. Opening output with less:
./directory-
./directory-
./directory-
So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?
I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.
Thanks in advance.
vim less editors
add a comment |Â
up vote
0
down vote
favorite
I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.
Now, when I run a command like this:
find -maxdepth 1 -type d -fprintf output "%pbn"
I get the following in output (using vim and pretty much any text editor):
.^H
./directory-1^H
./directory-2^H
./directory-3^H
I understand that ^H is the backspace character. Opening output with less:
./directory-
./directory-
./directory-
So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?
I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.
Thanks in advance.
vim less editors
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.
Now, when I run a command like this:
find -maxdepth 1 -type d -fprintf output "%pbn"
I get the following in output (using vim and pretty much any text editor):
.^H
./directory-1^H
./directory-2^H
./directory-3^H
I understand that ^H is the backspace character. Opening output with less:
./directory-
./directory-
./directory-
So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?
I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.
Thanks in advance.
vim less editors
I thought of playing around a bit with find -fprintf. In case you don't know what -fprintf does, it is the same as -printf but writing to a file you specify its name.
Now, when I run a command like this:
find -maxdepth 1 -type d -fprintf output "%pbn"
I get the following in output (using vim and pretty much any text editor):
.^H
./directory-1^H
./directory-2^H
./directory-3^H
I understand that ^H is the backspace character. Opening output with less:
./directory-
./directory-
./directory-
So, the question is: Why do vim and other text editors (tried nano, and emacs) display the backspace without interpreting it by removing the character before it but less does?
I'm running this on my machine (laptop) without sshing anywhere. Using GNU/Linux Ubuntu 16.04 LTS with konsole and tmux.
Thanks in advance.
vim less editors
vim less editors
asked 10 mins ago
joker
1816
1816
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475883%2fprintf-and-backspace%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password