Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curlopt_fnmatch_function(3) [mojave man page]

CURLOPT_FNMATCH_FUNCTION(3)				     curl_easy_setopt options				       CURLOPT_FNMATCH_FUNCTION(3)

NAME
CURLOPT_FNMATCH_FUNCTION - wildcard matching function callback SYNOPSIS
#include <curl/curl.h> int fnmatch_callback(void *ptr, const char *pattern, const char *string); CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FNMATCH_FUNCTION, fnmatch_callback); DESCRIPTION
Pass a pointer to your callback function, which should match the prototype shown above. This callback is used for wildcard matching. Return CURL_FNMATCHFUNC_MATCH if pattern matches the string, CURL_FNMATCHFUNC_NOMATCH if not or CURL_FNMATCHFUNC_FAIL if an error occurred. DEFAULT
NULL == an internal function for wildcard matching. PROTOCOLS
FTP EXAMPLE
TODO AVAILABILITY
Added in 7.21.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_FNMATCH_DATA(3), CURLOPT_DEBUGFUNCTION(3), libcurl 7.54.0 February 03, 2016 CURLOPT_FNMATCH_FUNCTION(3)

Check Out this Related Man Page

CURLOPT_CHUNK_BGN_FUNCTION(3)				     curl_easy_setopt options				     CURLOPT_CHUNK_BGN_FUNCTION(3)

NAME
CURLOPT_CHUNK_BGN_FUNCTION - callback before a transfer with FTP wildcardmatch SYNOPSIS
#include <curl/curl.h> long chunk_bgn_callback(const void *transfer_info, void *ptr, int remains); CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_BGN_FUNCTION, chunk_bgn_callback); DESCRIPTION
Pass a pointer to your callback function, which should match the prototype shown above. This callback function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks). The transfer_info pointer will point to a struct curl_fileinfo with details about the file that is about to get transferred. This callback makes sense only when using the CURLOPT_WILDCARDMATCH(3) option for now. The target of transfer_info parameter is a "feature depended" structure. For the FTP wildcard download, the target is curl_fileinfo struc- ture (see curl/curl.h). The parameter ptr is a pointer given by CURLOPT_CHUNK_DATA(3). The parameter remains contains number of chunks remaining per the transfer. If the feature is not available, the parameter has zero value. Return CURL_CHUNK_BGN_FUNC_OK if everything is fine, CURL_CHUNK_BGN_FUNC_SKIP if you want to skip the concrete chunk or CURL_CHUNK_BGN_FUNC_FAIL to tell libcurl to stop if some error occurred. DEFAULT
NULL PROTOCOLS
FTP EXAMPLE
TODO AVAILABILITY
This was added in 7.21.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_CHUNK_END_FUNCTION(3), CURLOPT_WILDCARDMATCH(3), libcurl 7.54.0 February 03, 2016 CURLOPT_CHUNK_BGN_FUNCTION(3)
Man Page

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to check if the argument contain wildcard (*,?) ?

In a script , i would like to check if the argument ( $1, $2 inside the script) contain wildcard (*,? etc). how do i do it? > script_name arg1 arg* $1 (arg1) does not contain wildcard, but $2 (arg* )contains wildcard. how can i tell in script? i need to do this is because : if arg1... (3 Replies)
Discussion started by: gusla
3 Replies

2. IP Networking

Remote file rename

What is the best way to rename a remote file using wildcard characters? I saw the FTP RENAME command, but it does not like wildcard charcters. (1 Reply)
Discussion started by: hshapiro
1 Replies

3. Shell Programming and Scripting

Fastest way to list a file in a folder containing 800,000 files using wildcard

Hi, I have a directory with possibly around 800,000 files in it. What is the fastest way to list file(s) in this directory with a wildcard. for example would ls -1 *.abcdefg.Z or find . -name "*.abcdefg.Z" be the fastest way to find all of the files that end with .abcdefg.Z... (6 Replies)
Discussion started by: jerardfjay
6 Replies

4. UNIX for Advanced & Expert Users

Unix wildcard character question

1. Is . wildcard? , the documented wildcard are "*", "?", and "" . seems mean everything, the follwing cmd will copy everything cp -r /tmp/test1/. /tmp/test2/ However it doesn't work for rm, why? $ ls -a . .. .a .aa aa t2 $ rm -rf . $ ls -a . .. .a .aa ... (3 Replies)
Discussion started by: honglus
3 Replies

5. UNIX for Dummies Questions & Answers

Dumb find question

All, For some reason I can't figure out why I can't wildcard my find statement to check for anything with a wildcard after. I can before the -name but not after. ie. find . -name *test works but find . -name test* gives me the error: find: paths must precede expression Usage: find ... (1 Reply)
Discussion started by: markdjones82
1 Replies

6. UNIX for Dummies Questions & Answers

Problem with sed wildcard "*"

Hi All, can you help me with "*" wildcard character in sed, i am a bit confused. I am going through a reference and found that below code sed -n '/a*c/' file will also return a line that contain the string output : close the window properly how is that possible when there is no "a"... (11 Replies)
Discussion started by: mukulverma2408
11 Replies

7. UNIX for Dummies Questions & Answers

How to download files matching pattern from FTP using CURL or WGET?

Hi, For an order I requested, the provider has uploaded a tar file in public FTP site which internally has tons of files (compressed) and I need to download files that follows particular pattern which would be few hundreds. Note: The order can't be requested for files that follows the... (7 Replies)
Discussion started by: Amalan
7 Replies

8. Shell Programming and Scripting

Expanding a list of wildcard filenames with spaces

I think I must be missing something obvious but I have a file containing a list of files and paths, some with wildcard, others with spaces. e.g. /this/is/a/file /this/is/a/directory/ /this/is/a/collection/* /this/has spaces/in/it /this/had spaces/and/list/of/files*... (6 Replies)
Discussion started by: mij
6 Replies

9. AIX

Issue with wildcard in filename (AIX 7.1.0.0)

Hi, This has been pestering me for quite a while, any help will be highly appreciated The current directory has a file with below name npidata_20050523-20171210.csv The below wildcard matched the above file ls -ltr npidata_????????-201712??.csv But when the part '201712' is put... (6 Replies)
Discussion started by: zulfi123786
6 Replies

10. Shell Programming and Scripting

Replace String matching wildcard pattern

Hi, I know how to replace a string with another in a file. But, i wish to replace the below string pattern EncryptedPassword="{gafgfa}]\asffafsf312a" i.e EncryptedPassword="<any random string>" To EncryptedPassword="" i.e remove the random password to a empty string. Can you... (3 Replies)
Discussion started by: mohtashims
3 Replies