Jump to content
mrPuh

AutoIT + SSH

Recommended Posts

mrPuh

Hi!

AutoIT successfully read data from plink console with StdoutRead().

But plink print some incorrect symbols (see screenshot).

From other console ssh-clients (openssh, putty, Bitvise stermc) StdoutRead() return empty string.

Help me please solve the problem.

Screenshot_2.jpg

Share this post


Link to post
Share on other sites
JLogan3o13

@mrPuh welcome to the forum. How about posting your code, rather than expecting us to guess? I have some plink scripts, and have not seen this.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
argumentum
On 11/18/2017 at 1:15 PM, mrPuh said:

plink print some incorrect symbols (see screenshot).

that is ANSI colors. the symbols are ESC codes.

Share this post


Link to post
Share on other sites
Bitnugger

This is because you have an alias for ls defined in your profile folder (/home/<username>/) in the .bashrc or .bash_aliases file. With me see the e.g. like this...

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    alias dir='dir --color=auto'
    alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'

In this case ls is executed with the option --color=auto. You can circumvent this by using/defining a different alias or simply by appending the option --color=never.

> ls --color=never

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×