Search Results

Search: Posts Made By: Kerberos
3,021
Posted By Kerberos
did anyone tell you you rock. Because you do. ...
did anyone tell you you rock. Because you do.
It looks like this solves all the problems i encountered before.
I can go on to error testing now, but i'm quite confident it will work.

thanks...
3,021
Posted By Kerberos
this would be perfect if not for the move i also...
this would be perfect if not for the move i also need to execute. Could i get 2 commands after the | ?
because it is very important that the mv is executed directly after the scp. (also the exit...
3,021
Posted By Kerberos
ksh - find command with 2 actions attached and error logging
Hi there,

I'm encountering problems on an AIX system when using following in my script.


find . -name *.edi -type f -exec sh -c 'scp {} $user@$server:$path || exit 5; mv {} $sent || exit...
24,632
Posted By Kerberos
ok guys, thanks a lot for the help. The 2nd...
ok guys,
thanks a lot for the help. The 2nd part of my scriptseries is finished. (couldnt have done it without the help)

here is the final result ;-)


#!/bin/bash
## created by: Tommy...
24,632
Posted By Kerberos
This works great, but i cant implement it from my...
This works great, but i cant implement it from my boss however :( :wall:
he thinks it is too risky just killing a process like that every time it fails :s (read as, he thinks a local remove of file...
24,632
Posted By Kerberos
The purpose would be to execute the rm and write...
The purpose would be to execute the rm and write the exit code of the rm to a file on the local machine. (sorry fairly new to scripting)

so you mean like this then?


echo "!rm -f "$FILE" ||...
24,632
Posted By Kerberos
i will try this one. at the moment i had...
i will try this one.

at the moment i had this



echo "Start of actual procedure"
echo "========================="
echo "Searching files other then ."$filetype" in "$tbtsftp" and move them...
24,632
Posted By Kerberos
i know, but our login is only allowed through...
i know, but our login is only allowed through sftp, all other protocols are blocked. :-)

(if this many experts don't know the answer, i'm feeling better already about not knowing it myself :p )
...
24,632
Posted By Kerberos
Yes i know that, and i know i could be able to...
Yes i know that, and i know i could be able to write a list directly after the transfer as follows

sftp> put $file
sftp> echo $file >> somecheckfile

but my boss won't allow me to do it like...
24,632
Posted By Kerberos
Yes that was also my thought :-) but my boss...
Yes that was also my thought :-)
but my boss shot the idea for following reason.
how will you know when the echo file > smth has worked or not :s
answer is, you won't

he's kind of a nitpicker...
24,632
Posted By Kerberos
thats the weird thing, it is failing on a put....
thats the weird thing, it is failing on a put. But not on any local command (preceeded by !)
24,632
Posted By Kerberos
that would indeed work, only as i mentioned...
that would indeed work, only as i mentioned before, the 3rd party server is a black box to us :-) (no possibility of getting scripts on it either :p)

---------- Post updated at 03:35 PM ----------...
24,632
Posted By Kerberos
This is what i first came up with, but there...
This is what i first came up with, but there seems to be a problem when doing this.
Since it is a large amount of files the script makes a lot of different sftp connections. After an upgrade of the...
24,632
Posted By Kerberos
!rm file is what you do when trying to remove a...
!rm file is what you do when trying to remove a local file while in an sftp shell. (hope i'm saying this right)
24,632
Posted By Kerberos
That would indeed work, except the only problem i...
That would indeed work, except the only problem i have is that the server we send this to is a 3rth party server to which only sftp connection from our side is allowed.
On top of that the directory...
24,632
Posted By Kerberos
bash script - sftpbatchfile - stop on failure
Hello all,

I am currently writing a script to send files to a server over sftp. When the sftp put command succeeds it wil preform a local move from within the sftp shell to another folder (this is...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy