HI ,
I am new to the perl , I am using a if condition and in that if condition i am checking 7 variables value. so it continue to second line .And if i user "\" for the continue line it showing error.
Example :
if(a >9 || b>8 || c> 10 \
d > 11)
{
print();
}
The above statement is... (3 Replies)
Hello, I am writing a script and in this script, I want to be able to have the script continue running if the correct word is not entered...
Here is an excerpt from me script:
read request
if ;
then
echo "You have asked for the System Temperature..."
cat... (1 Reply)
Hello all,
I am trying to do a tail in a script. But when I quit the tail my script quits also. This is not what I want. I am struggling to get this done.
#!/bin/bash
askFile() {
echo -n "Enter file: "
read FILE
}
doTail() {
tail -F "${1}"
}
askFile
doTail... (4 Replies)
How can I get a script to complete a update, varifiy completion, resboot, and continue with script?
Is it possbile to get script to add itself to the "startup application" list
#!/bin/bash
clear
sudo apt-get update
#Verify/test the update completed
#Reboot
#Start/comtinue... (9 Replies)
All,
Is there a way to keep checking for a file over and over again in the same script for an interval of time?
Ie
If {
mail -user
continue checking until file arrives
file arrives
tasks
exit
I don't want the script to run each time and email the user each time a file... (4 Replies)
Hi there,
I'm not really stranger to Linux and shell scripting but I am to servers. Anyway, I usually run scripts on a shared science machine, accessible via ssh.
My scripts are usually run with mpi, e.g.
mpirun -np 16 ./my_script
the things after entering the science machine and running... (6 Replies)
I'm trying to get the following to look for the newest powerpoint presentation and if it finds something then run a shell script named star_presentation.sh and if it doesn't then simply exit.
Any help would be greatly appreciated.
#!/bin/bash
ppts=/ticker/powerpointshare
find $ppts... (3 Replies)
I'm facing issues in executing the bash script of mine. This script will pick the latest file received and connects SFTP server and files is placed on this remote server.
Error message
Enter password:
"File movement"
sftp> cd Test
sftp> put Test_File_201309.txt
File "Test_File_201309.txt"... (6 Replies)
Dear Help,
Is it possible to continue the loop by going to the next available value, if the 'expected value' is not found. I have a list of values which might not get incremented by fixed value and hence the loop could break and the script could terminate.
Any suggestion is appreciated.
... (1 Reply)
Discussion started by: Indra2011
1 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)