PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : sftp in Scritps



Christoph
11-09-2002, 08:56
Da ein Server von FTP auf SFTP umgestellt wird, muss ich meine
Shellscripts umstellen.

Leider kann der normale sftp-Client anders als der normale ftp-Client
keine Macros, die ich in meinen Scripten exzessiv verwende.

Beispielmacro:



macdef mmd
mkdir \$i

\$mmd $DIRLIST


Frage:
Kennt jemand einen sftp-Client, der Macros kann?

Christoph

tkortkamp
11-09-2002, 12:29
Auszug aus der man-Page zu sftp:


The options are as follows:

-b batchfile
Batch mode reads a series of commands from an input batchfile
instead of stdin. Since it lacks user interaction it should be
used in conjunction with non-interactive authentication. sftp
will abort if any of the following commands fail: get, put,
rename, ln, rm, mkdir, chdir, lchdir and lmkdir.


c ya,
Tobias

Christoph
11-09-2002, 13:22
Die Option -b ist natürlich nicht nötig:



sftp <<EOF
(sftp commands)
EOF


Das ist aber für meine Zwecke noch nicht hinreichend;
zusätzlich bräuchte ich eben noch das "Makro-Feature",
das der normale ftp-Client hat.