I have a script ABC which calls another script XYZ. Function of XYZ is to ftp a file from one server to another.
code for ABC:
code for xyz:
In script XYZ, I am trying to ftp a file. So during ftp , whenever it shows that space is less than size of file, it should ftp the partial according to the available space and prompt a message about it and also prompt a message to outer script that inner script could not complete successfully. Hence resulting in the failure of outer script, due to partial ftp of file.
Also please post the comments about the each step of script to explain what is happening in that step. Thanks a lot in advance.
Hi , i have shell scripts that run the mysql directly by echoing and redirecting the output to the mysql logins. whenever the query executes successfully then the script runs fine and nothing has to be done there.
Now, when there is an error executing the query then it will generate the error... (8 Replies)
Hi
when use "tar cpvzf /dev/st0 --exclude=/proc --exclude-/lost+found --exclude=/mnt --exclude=/media --exclude=/sys /" to tape,
get the following message "tar: error exit delayed form pervious error",
What is the mean ? Please suggest some solution for these errors. thx (1 Reply)
Hi.
I am trying to extract the output of the first few lines of a continuos sh script.
The when i run it, i wont to grep the the first 20 lines of it for an entry and basically do a crtl z out of it or to that effect, and output the results to a text file.
I basically want to script... (5 Replies)
I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts.
Here is my script
#!/bin/csh -f
source .orapass
set user = $USER
set pass = $PASS
cd /opt/data/scripts
echo... (2 Replies)
Hi guys
I would just like to know if aCC supports the command exit(0); in c++?
I am always getting the error below:
Error 328: "ac5.C", line 37 # Function 'exit' has not been defined yet; cannot call.
exit(0);
^^^^
Anyone had this problem?
Thanks! (2 Replies)
HI
I am just using cd Command and i want exit if error.
Ex.
cd /hp/pp/0720
If above folder in not available then stop the script
Folder is change every day
Thanks (3 Replies)
Hi all,
I have a shell script inside which i am executing another shell script. In the inner script im executing a command. i want the status of that command in the outer script to perform some validations.
How to get its status please help!!1
Im using ksh. (2 Replies)
hi,
i want to pop up an alert box using perl script. my requirement is.
i am using a html page which calls a perl script. this perl script calls a shell script.. after the shell script ends its execution, i am using exit 0 to terminate the shell script successfully and exit 1 to terminate the... (3 Replies)
Hi Guys,
I am calling a SQL script which runs under while loop, i need to exit the while loop if i get error in sql script which is called
while
do
sqlplus -s user/pass@db @test.sql id$i
done
test.sql
whenever sqlerror exit;
alter table t1 add &1 number;
I need to come out of... (2 Replies)
Discussion started by: rohit_shinez
2 Replies
LEARN ABOUT PHP
ftp_alloc
FTP_ALLOC(3) 1 FTP_ALLOC(3)ftp_alloc - Allocates space for a file to be uploadedSYNOPSIS
bool ftp_alloc (resource $ftp_stream, int $filesize, [string &$result])
DESCRIPTION
Sends an ALLO command to the remote FTP server to allocate space for a file to be uploaded.
Note
Many FTP servers do not support this command. These servers may return a failure code ( FALSE) indicating the command is not sup-
ported or a success code ( TRUE) to indicate that pre-allocation is not necessary and the client should continue as though the oper-
ation were successful. Because of this, it may be best to reserve this function for servers which explicitly require preallocation.
PARAMETERS
o $ftp_stream
- The link identifier of the FTP connection.
o $filesize
- The number of bytes to allocate.
o $result
- A textual representation of the servers response will be returned by reference in $result if a variable is provided.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
ftp_alloc(3) example
<?php
$file = "/home/user/myfile";
// connect to the server
$conn_id = ftp_connect('ftp.example.com');
$login_result = ftp_login($conn_id, 'anonymous', 'user@example.com');
if (ftp_alloc($conn_id, filesize($file), $result)) {
echo "Space successfully allocated on server. Sending $file.
";
ftp_put($conn_id, '/incomming/myfile', $file, FTP_BINARY);
} else {
echo "Unable to allocate space on server. Server said: $result
";
}
ftp_close($conn_id);
?>
SEE ALSO ftp_put(3), ftp_fput(3).
PHP Documentation Group FTP_ALLOC(3)