I know that there is a no SSH to drive it himself, however the other end is moving the files off as they arrive, so perhaps that can be altered to expect a compressed tar file, was my thought.
It depends what the receiving company is prepared to do after they "fixed" a working system that allowed Kerberos to send single files and therefore delete single files in a controlled way. Unfortunately now you want to open a single connection and move all of the files.
Another alternate would be to fire in something like into the sftp batch file:-
This will cause sftp to get a kill -15 and exit with $?=1 You can then pick that up with your shell script.
Does that help?
Robin
Liverpool/Blackburn
UK
This works great, but i cant implement it from my boss however
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 which you are owner of will fail a lot, sigh)
---------- Post updated at 09:37 AM ---------- Previous update was at 09:35 AM ----------
Quote:
Originally Posted by Corona688
Ah, I see.
Your quotes had me confused, because quotes don't work that way. You weren't getting the string you expected in the file.
And the variables substituted immediately, not when the line was actually ran.
And | still doesn't make sense there.
How about:
just tested and it seems to work
so if i get this right, you escape the quotes and the $ sign. Why didnt I think of that
will post the whole scripts when i tested completely.
fingers crossed now :-)
*** edit ***
just 1 more question which i cant seem to find the answer to.
What is exactly the difference between | and || ?
just 1 more question which i cant seem to find the answer to.
What is exactly the difference between | and || ?
|| is a control operator that specifies what to do if the test is false.
|| actually represent the (logical) OR operator
[ -x file ] || echo "file is NOT executable"
if the file is NOT executable then (( [ -x file ] )) command returns a non-zero exit status code.
and if this status code is non-zero value then (( echo "file is executable" )) command is executed by shell.
for example
| is a control operator that create a pipeline structure.
rpm -qa|grep glibc
in this (( grep )) reads the previous command's ((rpm -qa)) output via a pipe (|) as input for itself ((grep glibc)) and process on it.
for example
/* you can think like this */
grep searches the glibc in the ((rpm -qa)) output and write the results..
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
I have a little code block (executing on AIX 7.1) that I cannot understand why the NOTFREE=0 does not appear to be assigned even though it goes through that block. This causes a unary operator issue.
#!/bin/bash
PLATFORM="AIX"
NEEDSPC=3000
set -x
if ; then
lsvg | grep -v rootvg | while... (6 Replies)
Hey all,
Here's my dilemma:
1. I'm a newbie at scripting!
2. I need to create a script that checks: If a file size is equal to zero, then stop the installation.
Is there a way to do this or am I wasting my time???
Thanx in advance! :b: (2 Replies)
Hi everyone,
I have this problem with a script I'm writting. I want to execute a code running in the background several times through a script. I am writting it like that
parent_script
for a in 1 2 3 4 5
do
exec test -n $a
done
What I want to do is when parent_script is killed,... (0 Replies)
Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
It is happening with my sessions already second time: a 'for'-loop for some reason stop to work as expected.
That means or it is looping without exitting, or it is not loop even once.
Here example of my try when it is not processing even one loop.
You can see, I start new subshell and... (14 Replies)
Hello everybody!
I am new to this and I am trying to change a script in an open source program that plots some offset vectors and then calls a postscript viewer. I have commented away the call for the postscript viewer but somehow the script doesn't return to the shell prompt. I cant figure out... (3 Replies)
Hi,
I am writing a bash shell script. How can I tell it to stop. For example, I would like to have something similar to the following:
mike=1
if ; then
STOP THE SCRIPT
fi (3 Replies)
Hi Folks,
I have been trying to create a script wherein after it reads a certain number of data, it will pause and ask the user if he wants to continue or not. However, it seems that when it is supposed to read the user's answer, the script will go into a loop. What is wrong with my script here?... (7 Replies)