Hi,
I'm writing a script which actually sftp's(gets!! i'm using mget) files from a windows box to unix server. (i've gone thru forum and got pretty good answers, Thx for that).
but the windows box to which i'm ftp'g prompts for a password change every 30 days. so please suggest me how to do... (3 Replies)
I want to write an sftp script, but I can't put ssh keys on my destination. Is it possible to pass sftp a password inside a script? I know that the -b option makes sftp use a file for params. Can the password go in such a file? How can I do this? Thanks in advance (3 Replies)
I am trying to SFTP to a couple sites. One has an RSA-KEY that was sent to me. Currently I am running that manually using WinSCP. I would like to set it up as a CRON process on our Linux host (Sun).
Can I use the rsa-key they sent me in any directory or does it need to be placed in a specific... (2 Replies)
Hi,
I have script which does the sftp function. In the script in one place it able to read the password from file and other place files with below error.
warning: has much more security than supplying the password in the clear
warning: on the command line.
Failed to get password: File... (0 Replies)
I am working on a sftp batch script on a Solaris machine and I need to connect using password. This is not an issue when i do it manually but when I want to make this into a script, i find there are no options for password.
Can anyone suggest how I can do it with password? I know using keys is... (3 Replies)
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
Hi All,
I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup.
I am working on Solaris 10.
Here is the code.
#!/bin/ksh
# sample automatic Sftp script to dump a file
USER="user1"
PASSWORD="pass1"
HOST="host1"
sftp $USER@$HOST... (6 Replies)
Hi,
Can anyone tell me how to pass password in a shell script for sftp so that i can run it in background without user entering the password?
I used a expect script but it timesout after some time and the process remains incomplete at the end.
Can anyone suggest any other idea?
Will the... (3 Replies)
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Hi All,
I have FTP script snippet
targetFTP=testcomp
userID=testid
userPass=XXXXX
server_availability ()
{
echo "***********************************************************" >> $FtpLog
echo "* Server Availability & User Access Checks *" >> $FtpLog
echo... (2 Replies)
Discussion started by: Riverstone
2 Replies
LEARN ABOUT OSX
lindex
lindex(n) Tcl Built-In Commands lindex(n)
__________________________________________________________________________________________________________________________________________________NAME
lindex - Retrieve an element from a list
SYNOPSIS
lindex list ?index...?
_________________________________________________________________DESCRIPTION
The lindex command accepts a parameter, list, which it treats as a Tcl list. It also accepts zero or more indices into the list. The
indices may be presented either consecutively on the command line, or grouped in a Tcl list and presented as a single argument.
If no indices are presented, the command takes the form:
lindex list
or
lindex list {}
In this case, the return value of lindex is simply the value of the list parameter.
When presented with a single index, the lindex command treats list as a Tcl list and returns the index'th element from it (0 refers to the
first element of the list). In extracting the element, lindex observes the same rules concerning braces and quotes and backslashes as the
Tcl command interpreter; however, variable substitution and command substitution do not occur. If index is negative or greater than or
equal to the number of elements in value, then an empty string is returned. The interpretation of each simple index value is the same as |
for the command string index, supporting simple index arithmetic and indices relative to the end of the list.
If additional index arguments are supplied, then each argument is used in turn to select an element from the previous indexing operation,
allowing the script to select elements from sublists. The command,
lindex $a 1 2 3
or
lindex $a {1 2 3}
is synonymous with
lindex [lindex [lindex $a 1] 2] 3
EXAMPLES
lindex {a b c}
-> a b c
lindex {a b c} {}
-> a b c
lindex {a b c} 0
-> a
lindex {a b c} 2
-> c
lindex {a b c} end
-> c
lindex {a b c} end-1
-> b
lindex {{a b c} {d e f} {g h i}} 2 1
-> h
lindex {{a b c} {d e f} {g h i}} {2 1}
-> h
lindex {{{a b} {c d}} {{e f} {g h}}} 1 1 0
-> g
lindex {{{a b} {c d}} {{e f} {g h}}} {1 1 0}
-> g
SEE ALSO
list(n), lappend(n), linsert(n), llength(n), lsearch(n), lset(n), lsort(n), lrange(n), lreplace(n), string(n) |
KEYWORDS
element, index, list
Tcl 8.4 lindex(n)