Sponsored Content
Top Forums Shell Programming and Scripting Using like operator in awk if condition Post 302975980 by karthik adiga on Wednesday 22nd of June 2016 04:27:45 AM
Old 06-22-2016
Sorry for the inconvienece RudiC.I will take care of it in future.Both the solutions provided by you is working fine ...Thanks a lot for the help!SmilieSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

OR operator syntax question in AWK script

Hi guys, I confused about syntax used in OR script as follow: I have this sample file separated by "|" containing: January|Month No. 1 February|Month No. 2 March|Month No. 3 April|Month No. 4 May|Month No. 5 June|Month No. 6 July|Month No. 7 August|Month No. 8 September|Month No. 9... (11 Replies)
Discussion started by: cgkmal
11 Replies

2. Shell Programming and Scripting

Awk with or and not operator

awk -F '/' '{ if (($2!="30") print }' f.dat > date_mismatch.dat The above command is giving the desired results But I would want use Or in the above but it is returning the complete file awk -F '/' '{ if ($2!="30"||$2!="31") print }' f.dat > date_mismatch.dat Have tried the... (1 Reply)
Discussion started by: infernalhell
1 Replies

3. Shell Programming and Scripting

HELP with AWK one-liner. Need to employ an If condition inside AWK to check for array variable ?

Hello experts, I'm stuck with this script for three days now. Here's what i need. I need to split a large delimited (,) file into 2 files based on the value present in the last field. Samp: Something.csv bca,adc,asdf,123,12C bca,adc,asdf,123,13C def,adc,asdf,123,12A I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies

4. Shell Programming and Scripting

unary operator expected, if condition test error.

Hi All, I'm assigning a numeric value to variable count=2, well its being assigned by code above the if condition. I want to test for 2 conditions , when $count = 0 or $count <=2 and do something when the condition matches. here is my code, but i run into the infamous : if ] then ... (2 Replies)
Discussion started by: Irishboy24
2 Replies

5. Shell Programming and Scripting

awk Help - Comparison Operator problem

Hi, I've tried searching through the forum but I've drawn a blank so i'm going to post here. I'm developing a number of checks on a CSV file, trying to find if any are greater than a max limit. I'm testing it by running it from a command line. The file I'm testing has 8 records. When I... (3 Replies)
Discussion started by: Tmart
3 Replies

6. UNIX for Dummies Questions & Answers

awk if statement / equals operator

Hi, I was hoping someone could explain this please :) I'm using bash, scientific linux... and I don't know what else you need to know. With awk '{ if( 0.3 == 0.1*3) print $1}' file.dat nothing will be printed since apparently the two numbers do not equate. (Using 0.3 != 0.1*3 is seen... (4 Replies)
Discussion started by: Golpette
4 Replies

7. Shell Programming and Scripting

awk - output comming strange: for operator ~ and == .

Hi awk experts, I am getting a strange output , may be it is normal but I am unable to comprehend, When Using == operator it is showing correct: # ls -l | awk '{for (i=0;i<=NF;i++) if ( $i =="info" )print $1,$6,$7,$8,$9}' drwx------ Jan 17 10:44 info But When using ~ (equal )... (4 Replies)
Discussion started by: rveri
4 Replies

8. Shell Programming and Scripting

Getting syntax error with awk ternary operator

split($7,a," "); date = a; time = a split(date,d,"/"); month = sprintf("%02d",d); day = sprintf("%02d",d); year = 2000 + d % 100 split(time,t,":"); hour=t; min=t hour >= 12? { hour=hour-12; amPm=" PM" } : amPM=" AM" hour == 0? hour=12 time=sprintf("%02d",hour)":"sprintf("%02d",min)amPm ... (4 Replies)
Discussion started by: Michael Stora
4 Replies

9. Shell Programming and Scripting

Plz help me out use OFMT operator in awk programming

Hi While calculating the sum of 6 and 7 fileds it is calculate the wrong value because of floating point like 7898778.10 awk ' BEGIN { FS = OFS = "|" } NR == 1 { next } { UX = $1 OFS $3 OFS $4 OFS $5 p1 +=$6 p2 +=$7 } END { for(i in UX) ... (8 Replies)
Discussion started by: jagu
8 Replies

10. UNIX for Beginners Questions & Answers

If condition on awk

Hi All, Would you guys help me? I have a file that consists of several unstructured fields. in this file I will take the code field and count_berry field. but the position of the count_berry field is always changing.the column for code is always structured, which is found in column 6 I have... (4 Replies)
Discussion started by: kivale
4 Replies
libcurl-thread(3)					       libcurl thread safety						 libcurl-thread(3)

NAME
libcurl-thread - libcurl thread safety Multi-threading with libcurl libcurl is thread safe but has no internal thread synchronization. You may have to provide your own locking should you meet any of the thread safety exceptions below. Handles. You must never share the same handle in multiple threads. You can pass the handles around among threads, but you must never use a single handle from more than one thread at any given time. Shared objects. You can share certain data between multiple handles by using the share interface but you must provide your own locking and set curl_share_setopt(3) CURLSHOPT_LOCKFUNC and CURLSHOPT_UNLOCKFUNC. TLS
If you are accessing HTTPS or FTPS URLs in a multi-threaded manner, you are then of course using the underlying SSL library multi-threaded and those libs might have their own requirements on this issue. You may need to provide one or two functions to allow it to function prop- erly: OpenSSL OpenSSL 1.1.0 "can be safely used in multi-threaded applications provided that support for the underlying OS threading API is built- in." https://www.openssl.org/docs/manmaster/crypto/threads.html#DESCRIPTION OpenSSL <= 1.0.2 the user must set callbacks. https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION https://curl.haxx.se/libcurl/c/opensslthreadlock.html GnuTLS http://gnutls.org/manual/html_node/Thread-safety.html NSS thread-safe already without anything required. PolarSSL Required actions unknown. yassl Required actions unknown. axTLS Required actions unknown. Secure-Transport The engine is used by libcurl in a way that is fully thread-safe. WinSSL The engine is used by libcurl in a way that is fully thread-safe. wolfSSL The engine is used by libcurl in a way that is fully thread-safe. BoringSSL The engine is used by libcurl in a way that is fully thread-safe. Other areas of caution Signals Signals are used for timing out name resolves (during DNS lookup) - when built without using either the c-ares or threaded resolver backends. When using multiple threads you should set the CURLOPT_NOSIGNAL(3) option to 1L for all handles. Everything will or might work fine except that timeouts are not honored during the DNS lookup - which you can work around by building libcurl with c-ares or threaded-resolver support. c-ares is a library that provides asynchronous name resolves. On some platforms, libcurl simply will not function properly multi-threaded unless the CURLOPT_NOSIGNAL(3) option is set. Name resolving gethostby* functions and other system calls. These functions, provided by your operating system, must be thread safe. It is very important that libcurl can find and use thread safe versions of these and other system calls, as otherwise it can't function fully thread safe. Some operating systems are known to have faulty thread implementations. We have previously received problem reports on *BSD (at least in the past, they may be working fine these days). Some operating systems that are known to have solid and working thread support are Linux, Solaris and Windows. curl_global_* functions These functions are not thread safe. If you are using libcurl with multiple threads it is especially important that before use you call curl_global_init(3) or curl_global_init_mem(3) to explicitly initialize the library and its dependents, rather than rely on the "lazy" fail-safe initialization that takes place the first time curl_easy_init(3) is called. For an in-depth explanation refer to libcurl(3) section GLOBAL CONSTANTS. Memory functions These functions, provided either by your operating system or your own replacements, must be thread safe. You can use curl_global_init_mem(3) to set your own replacement memory functions. Non-safe functions CURLOPT_DNS_USE_GLOBAL_CACHE(3) is not thread-safe. libcurl 7.54.0 April 10, 2017 libcurl-thread(3)
All times are GMT -4. The time now is 11:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy