Sponsored Content
Full Discussion: sFTP result
Top Forums Shell Programming and Scripting sFTP result Post 302129688 by ahmedwaseem2000 on Wednesday 1st of August 2007 07:23:17 AM
Old 08-01-2007
try this:

on the source server
Code:
 sed -n '$=' datafile > count_file

FTP both count_file and datafile

then on the target server try this


Code:
 
sed '$=' datafile |read TGT_COUNT
cat count_file |read SOURCE_COUNT

if [[ $TGT_COUNT -eq $SOURCE_COUNT ]]; then

echo "FTP SUCCESSFULL"

else
echo "FTP FAILED"
exit 1
fi

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sftp result

Hi, I have a sftp account to another server, from which I need to find out all the files match "*.abc.*.xml" pattern in a certain directory. I have a batchfile as follows cd /tmp ls -l *.abc.*.xml quit then I run output=`/usr/local/bin/sftp -B $batchfile $USER@$HOST` the result looks... (2 Replies)
Discussion started by: mpang_
2 Replies

2. Shell Programming and Scripting

Outputting formatted Result log file from old 30000 lines result log<help required>

Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in 1) starting with "20071126 11:11:11 Machine Header 1" 1000 lines... "End machine header 1" 2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies

3. UNIX for Dummies Questions & Answers

display the result of wc -l with words before and after the result

hello showrev -p | wc -l returns: 381 What to do in case I want to have this output: number of lines returned by showrev -p is: 381 thx (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

4. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies

5. UNIX for Dummies Questions & Answers

what is the result of this?

if ] (1 Reply)
Discussion started by: prathimahsc
1 Replies

6. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

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)
Discussion started by: noobrobot
1 Replies

7. Red Hat

Chroot sftp users, remote sftp login shows wrong timestamp on files

Hello, I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration. #pwd... (8 Replies)
Discussion started by: bobby320
8 Replies

8. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies

9. UNIX for Dummies Questions & Answers

Sftp using batchfile - storing result local

I'm making an sftp-connection to a remote server. I want the result of an ls-command in a local file and the result of ls on another folder in another local file. Because everything has to go as fast a possible I wan't to do everyting in one connection. The command I use is : psftp -v -batch -b... (4 Replies)
Discussion started by: pistach
4 Replies

10. Shell Programming and Scripting

How to compare the current result with previous line result.?

Hi Gurus, I have requirement to compare current result with previous reuslt. The sample case is below. 1 job1 1 1 job2 2 1 job3 3 2 job_a1 1 2 job_a2 2 2 job_a3 3 3 job_b1 1 3 job_b2 2 for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies
eXosip_event(3) 						    libeXosip2							   eXosip_event(3)

NAME
eXosip_event - SYNOPSIS
#include <eXosip.h> Data Fields eXosip_event_type_t type char textinfo [256] void * external_reference osip_message_t * request osip_message_t * response osip_message_t * ack int tid int did int rid int cid int sid int nid int ss_status int ss_reason Detailed Description Structure for event description Field Documentation eXosip_event_type_t eXosip_event::type type of the event char eXosip_event::textinfo[256] text description of event void* eXosip_event::external_reference external reference (for calls) osip_message_t* eXosip_event::request request within current transaction osip_message_t* eXosip_event::response last response within current transaction osip_message_t* eXosip_event::ack ack within current transaction int eXosip_event::tid unique id for transactions (to be used for answers) int eXosip_event::did unique id for SIP dialogs int eXosip_event::rid unique id for registration int eXosip_event::cid unique id for SIP calls (but multiple dialogs!) int eXosip_event::sid unique id for outgoing subscriptions int eXosip_event::nid unique id for incoming subscriptions int eXosip_event::ss_status current Subscription-State for subscription int eXosip_event::ss_reason current Reason status for subscription Author Generated automatically by Doxygen for libeXosip2 from the source code. Version 3.1.0 Sun Jun 24 2012 eXosip_event(3)
All times are GMT -4. The time now is 01:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy