Hi all! Thanks for all the answers, and really sorry for the delayed answer. Since my test failed (and led me to misunderstand where the issue resided), I improved it a bit to properly show the failure happening: ************************ ~/> which tcsh /usr/bin/tcsh ~/> ls -l /usr/bin/tcsh lrwxrwxrwx 1 root root 9 mar 19 2018 /usr/bin/tcsh -> /bin/tcsh ~/> sftp -P 2221 android@192.168.0.12 Password authentication Password: Connected to 192.168.0.12. sftp> ls Auto Camera Facebook Google Photos IMG_20171215_152523644-01.jpeg sftp> bye ~/> cat teste.x #!/bin/tcsh set HOST = "192.168.0.12" set PORT = "2221" set USER = "android" setenv SSHPASS "temporario" echo $SHELL echo $SSHPASS sshpass -e sftp -P $PORT $USER@$HOST >& tmp.tmp << EOF ls bye EOF unsetenv SSHPASS ~/> ./teste.x /bin/bash temporario ~/> **************************** So: 1) there is an tcsh installed and working on the machine; 2) there is a sftp server up and running at that ip address; 3) I successfully access it interactively; 4) the environment variable needed for sshpass have the password is given in the script, but the script is not answering sftp requests it is making (which is central for the script). Does anybody have any clue what is going wrong here? Thanks a lot in advance! Sincerely yours, Jones Em 2019-12-07 17:34, Dave Howorth escreveu:
On Sat, 7 Dec 2019 08:21:32 +0100 David Haller <dnh@opensuse.org> wrote:
Hello, On Fri, 06 Dec 2019, Dave Howorth wrote:
On Fri, 06 Dec 2019 14:00:34 -0200 Jones De Andrade <00037991@ufrgs.br [1]> wrote:
at the beggining of the script. However, since it failed, I tested and discovered that: #!/bin/tcsh echo $SHELL Would still tell me I'm in bash. No, it tells you that the value of the SHELL variable is still bash, not which shell is actually running. To wit: $ tcsh -c 'set | grep -i tcsh' command set | grep -i tcsh shell /bin/tcsh tcsh 6.20.00 version tcsh 6.20.00 (Astron) ... $ tcsh -c 'echo $shell' /bin/tcsh $ tcsh -c 'ls -l /proc/$$/exe' lrwxrwxrwx 1 dh dh 0 Dec 7 08:20 /proc/14346/exe -> /bin/tcsh HTH,
I think it just confuses:
$ tcsh -c 'echo $shell' /bin/tcsh $ tcsh -c 'echo $SHELL' /bin/bash
-dnh
-- Jones de Andrade (jdandrade@iq.ufrgs.br) DFQ/IQ/UFRGS Lattes: http://lattes.cnpq.br/6675936210583999 Orcid: https://orcid.org/0000-0003-3429-8119 ResearcherID: https://publons.com/researcher/AAC-5337-2019/ Links: ------ [1] mailto:00037991@ufrgs.br -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org