Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Error with .sh within .sh called thru WinSCP

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.
sheauyun

It is weird -- plink also giving same problem. PuTTY works fine. :?:
sheauyun

Error with .sh within .sh called thru WinSCP

Hi,

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 nvwp.sh from WinSCP and this works fine. But, the nvwp.sh 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/nvwp.sh: line 31: i2cget: command not found
! 2015-08-20 09:55:57.781 /opt/usr/sbin/nvwp.sh: line 31: i2cget: command not found


I try to call cd /usr/sbin before calling /opt/usr/sbin/nvwp.sh 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.

Thanks.