Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

shell executor results in invalid command

Im trying to execute shell script to move a file to archive folder. I can acheive this from local machine command prompt by the following script. But Shell Executor always comes up with some logs and invalid commands. I also tried rename command, but no hope. Please help me to achieve this. Please find the logs below. Script:

!/bin/bash

HOST='10.175.113.35' USER='' PASSWORD='*' File_To_Archive=$sourcefile Archive_Folder=$archivefile file=$filename echo "filename" echo $file ftp -inv $HOST <<eof user="" $user="" $password="" get="" $file_to_archive="" cd="" eps="" stbl="" archive="" put="" $file_to_archive="" bye="" eof="" exit="" 0<="" p="">

Logs: stdout: Connected to ... (...).
stdout: 220 Microsoft FTP Service stderr: local: EPS/STBL/Archive: stdout: Remote system type is Windows_NT.
stdout: ?Invalid command
stdout: (remote-file) local: EPS/STBL/Archive remote: cd
stdout: (local-file) (remote-file)
stdout: 221 Goodbye.

shell executor results in invalid command

Im trying to execute shell script to move a file to archive folder. I can acheive this from local machine command prompt by the following script. But Shell Executor always comes up with some logs and invalid commands. I also tried rename command, but no hope. Please help me to achieve this. Please find the logs below. below.

Script:

!/bin/bash

HOST='10.175.113.35' HOST='...' USER='' PASSWORD='*PASSWORD='**' File_To_Archive=$sourcefile Archive_Folder=$archivefile file=$filename echo "filename" echo $file ftp -inv $HOST <<eof user="" $user="" $password="" get="" $file_to_archive="" cd="" eps="" stbl="" archive="" put="" $file_to_archive="" bye="" eof="" exit="" 0<="" p="">

Logs: stdout: Connected to ... (...).
stdout: 220 Microsoft FTP Service stderr: local: EPS/STBL/Archive: stdout: Remote system type is Windows_NT.
stdout: ?Invalid command
stdout: (remote-file) local: EPS/STBL/Archive remote: cd
stdout: (local-file) (remote-file)
stdout: 221 Goodbye.

shell executor results in invalid command

Im trying to execute shell script to move a file to archive folder. I can acheive this from local machine command prompt by the following script. But Shell Executor always comes up with some logs and invalid commands. I also tried rename command, but no hope. Please help me to achieve this. Please find the logs below.

Script:

!/bin/bash

HOST='...' USER='' PASSWORD='**'

#!/bin/bash
HOST='**.**.**.***'
USER='***'
PASSWORD='****'
File_To_Archive=$sourcefile
Archive_Folder=$archivefile
file=$filename
echo "filename"
echo $file
ftp -inv $HOST <<eof user="" $user="" $password="" get="" $file_to_archive="" cd="" eps="" stbl="" archive="" put="" $file_to_archive="" bye="" eof="" exit="" 0<="" p="">
<<EOF
user $USER $PASSWORD
get $File_To_Archive
cd EPS/STBL/Archive
put $File_To_Archive
bye
EOF
exit 0

Logs:

Logs:

stdout: Connected to ...**.**.***.** (**.**.***.**).  (...). 
stdout: 220 Microsoft FTP Service stderr: local: EPS/STBL/Archive: stdout: Remote system type is Windows_NT.
stdout: ?Invalid command
stdout: (remote-file) local: EPS/STBL/Archive remote: cd
stdout: (local-file) (remote-file)
stdout: 221 Goodbye.

Goodbye.