0

I'm viewing the outputs of a bash script that logs into juniper devices and runs commands.

When I view the output of the script via the unix server using cat <filename> it appears just fine.

When I view it from WinSCP it shows a repeating special character at apparently random intervals??

Here is a small snippet of the absolutely massive (relatively) file that is shown.

{primary:node0}[edit] USER@HOST# rollback {primary:node0}[edit] USER@HOST# set security address-book global address-set RANDOM-GRP USER@HOST# ...k global address-set RANDOM-GRP address 

Same exact file but viewed from within the terminal.

{primary:node0}[edit] USER@HOST# rollback {primary:node0}[edit] USER@HOST# ...RANDOM-GRP address RANDOM-ADDRESS {primary:node0}[edit] USER@HOST# ...RANDOM-GRP address RANDOM-ADDRESS 

EDIT: Makes sense the characters can't be displayed in the browser. Here is a screenshot of this.

https://imgur.com/a/eolIh4n 

According to a unicode search engine these characters are:

U+0008 : <control> BACKSPACE [BS] U+0008 : <control> BACKSPACE [BS] U+0008 : <control> BACKSPACE [BS] U+0008 : <control> BACKSPACE [BS] U+0008 : <control> BACKSPACE [BS] 

1 Answer 1

1

That character is byte 0x08, which in the IBM "OEM" code pages (still used by Windows console) is the graphic, but in ASCII it's the "Backspace" control character. When output to a Unix-style terminal it visually deletes one character back.

(Most characters in the ASCII control character range have this kind of dual purpose in OEM codepages.)

Your Juniper CLI most likely uses this to create an illusion of a scrolling input line, by outputting as many "backspaces" as necessary to remove the text you typed, before redrawing it. For example, as soon as the command gets longer than would fit in a single line, normally it would wrap to the next line – but the Juniper CLI emits "Backspace" characters to erase it from your terminal and re-shows just ...last few words.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.