Topic "Error with .sh within .sh called thru WinSCP"

Author Message
[View user's profile]

Joined: 2012-12-27
Posts: 12

I had being using WinSCP for quite a long while and it is awesome. Until recently I bumped into problem calling a .sh that throwing error when I run it with WinSCP. I don't see same problem if I try to run it on Terminal.
So, wondering how could I fix that.

I am calling from WinSCP and this works fine. But, the had called some executable in /usr/sbin/ can caused problem: (i2cget is the file located in /usr/sbin)

< 2015-08-20 09:55:57.781 Script: /opt/usr/sbin/ line 31: i2cget: command not found
! 2015-08-20 09:55:57.781 /opt/usr/sbin/ line 31: i2cget: command not found

I try to call cd /usr/sbin before calling /opt/usr/sbin/ hoping that it would temporarily solve my problem but it did not.
I don't need to stay in /usr/sbin to get things work without need to change the .sh file.

[View user's profile]

Joined: 2012-12-27
Posts: 12
It is weird -- plink also giving same problem. PuTTY works fine. Question
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24755
Location: Prague, Czechia
WinSCP (and Plink) uses (have to) non-interactive terminal.

So different set of startup scripts (or different branches in startup scripts) are executed. What possibly results in different search paths (PATH) being set.

Fix your startup scripts to set the same PATH for both interactive and non-interactive sessions.

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License