9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following files
list.txt
string1<TAB>ABC
string2<TAB>DEF
string3<TAB>GHIquery.txt
ABC
DEF
GHI
ABCNow I want to check, if a string in the first column of list.txt is twice in query.txt
so my command is:
while IFS=$'\t' read k v ; do if (($(grep -i '$v' query.txt | wc... (2 Replies)
Discussion started by: tons92
2 Replies
2. Shell Programming and Scripting
Hi,
I have a pipe delimited file. I am checking for junk characters ( non printable characters and unicode values).
I am using the following code
grep '' file.txt
But i want to ignore the name fields. For example field2 is firstname so i want to ignore if the junk characters occur... (4 Replies)
Discussion started by: ashwin3086
4 Replies
3. Infrastructure Monitoring
Dear All
I want to block email attachments upload on internet through different mail servers. My requirement is that no user can send email attachments on yahoo, hotmail, gmail etc. I have RHEL-5 and squid 2.7. I have applied the undermentioned ACL but it in vain
ACL is
acl fileupload... (2 Replies)
Discussion started by: surfer24
2 Replies
4. Shell Programming and Scripting
Hello All,
I am trying to write a script to search in my current directory to look for all files that end with HTML and look for any HTML tags that are in upper case. for example if I were to grep test.html and test.html has a tag <P> instead of <p> then it would print the file name. This is... (11 Replies)
Discussion started by: rawmaterial
11 Replies
5. Shell Programming and Scripting
Hello,
We have been having some issues with our users overwriting files, and then not having a backup. What I would love to do, is create a shell script to monitor /tmp, for uploads, and make a copy of the file they are trying to upload before the upload finishes.
Is this possible at all? (6 Replies)
Discussion started by: mrfr0g
6 Replies
6. Shell Programming and Scripting
hey all,
i am a shell scripting n00b so bear with me. i got a server that every night uploads one file to a remote server. the file is prodserver_date_time.
i would like to make a script, run by root on a daily cron job. i want it to determine if the file was received or not. no md5... (2 Replies)
Discussion started by: jweinraub
2 Replies
7. Linux
Is there any mechanism within vsftpd to hide partially uploaded files, ie give them a hidden file name. Pro ftp has this option with the hidden stor option in the configuration file.
If there is no such feature how do I go about requesting that the vsftpd developers create this option or is... (3 Replies)
Discussion started by: jhod22
3 Replies
8. OS X (Apple)
We have just added 5 macs to what used to be an all Windows shop. Everything works great except the macs upload to a windows 200 file server extremly slow. Are there any suggestions to make the upload faster? (2 Replies)
Discussion started by: wbeard6142
2 Replies
9. Cybersecurity
Hello All!
Am new here; please excuse any blunders!
Am dealing with an off-site ISP UNIX server on which no Telnet access and no Anonymous FTP access is allowed, and which is hosting a client web site.
Need to create a separate area within that site to hold occasional outside ftp uploads... (3 Replies)
Discussion started by: NAL
3 Replies
CURL_FILE_CREATE(3) 1 CURL_FILE_CREATE(3)
CURLFile::__construct - Create a CURLFile object
Object oriented style
SYNOPSIS
public CURLFile::__construct (string $filename, [string $mimetype], [string $postname])
DESCRIPTION
Procedural style
CURLFile curl_file_create (string $filename, [string $mimetype], [string $postname])
Creates a CURLFile object, used to upload a file with CURLOPT_POSTFIELDS.
PARAMETERS
o $filename
- Path to the file which will be uploaded.
o $mimetype
- Mimetype of the file.
o $postname
- Name of the file to be used in the upload data.
RETURN VALUES
Returns a CURLFile object.
EXAMPLES
Example #1
curl_file_create(3) example
Object oriented style
<?php
/* http://example.com/upload.php:
<?php var_dump($_FILES); ?>
*/
// Create a cURL handle
$ch = curl_init('http://example.com/upload.php');
// Create a CURLFile object
$cfile = new CURLFile('cats.jpg','image/jpeg','test_name');
// Assign POST data
$data = array('test_file' => $cfile);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
// Execute the handle
curl_exec($ch);
?>
Procedural style
<?php
/* http://example.com/upload.php:
<?php var_dump($_FILES); ?>
*/
// Create a cURL handle
$ch = curl_init('http://example.com/upload.php');
// Create a CURLFile object
$cfile = curl_file_create('cats.jpg','image/jpeg','test_name');
// Assign POST data
$data = array('test_file' => $cfile);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
// Execute the handle
curl_exec($ch);
?>
The above example will output:
array(1) {
["test_file"]=>
array(5) {
["name"]=>
string(9) "test_name"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(14) "/tmp/phpPC9Kbx"
["error"]=>
int(0)
["size"]=>
int(46334)
}
}
SEE ALSO
curl_setopt(3).
PHP Documentation Group CURL_FILE_CREATE(3)