Sponsored Content
Top Forums Shell Programming and Scripting Help in Understanding awk if ( F ) syntax - Post 302901440 by rveri on Tuesday 13th of May 2014 07:00:12 PM
Old 05-13-2014
F can only be true if F is 0 or 1 or has numeric value , is it correct. Thanks..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help on understanding the Shell and AWK scripts

Hello Friends, I am new to the scripting & have to analyze bunch of regular production scripts. It has .ksh which calls on the .awk script having many functions I need to understand and debug the scripts ASAP Can anybody please let me know as how can I debug, I want to see the flow of code... (3 Replies)
Discussion started by: amberj123
3 Replies

2. Shell Programming and Scripting

Help understanding syntax error Issue

Hi i as you may already know i am creating a menu driven program. I have chosen to take the approach of implementing each interface individually, after adding another interface and attempting to run the program i am faced with the following error: ./Assigntest: line 32: syntax error near... (6 Replies)
Discussion started by: warlock129
6 Replies

3. Shell Programming and Scripting

Understanding Awk and Cat

Hi Guys, I was recently come across some code to hopefully learn a little bit about putting Shell commands into PHP application to run on a Linux server. However, I don't understand the command AT ALL... and was wondering if anyone can interpret it: cat userIDs.dat | awk '{s=s+1; if... (1 Reply)
Discussion started by: jordRiot
1 Replies

4. UNIX for Dummies Questions & Answers

understanding part of an awk script

Hi I have an awk script running in ksh in which a section of code is picking out the datetime as follows: dia=`echo $starttime | nawk '{ printf "%02d\n", substr($1,9,2)}'` mes=`echo $starttime | nawk '{ printf "%02d\n", substr($1,6,2)}'` ano=`echo $starttime | nawk '{ printf "%02d\n",... (3 Replies)
Discussion started by: shajju
3 Replies

5. UNIX for Advanced & Expert Users

understanding awk in this script

i am analyzing a query written by another developer ,need to understand part of script am looking at a code ..and it converts comma files to pipe delimited and also takes away quotes from any columns, source field format: 2510,"Debbie",NewYork changes to target: 2510|Debbie|NewYork ... (1 Reply)
Discussion started by: coolrock
1 Replies

6. Shell Programming and Scripting

Help in understanding awk expression

Hi, Could somebody help me in understanding the following awk expression: awk -v n="POINT" '/%/{print $0 "\n" n ;next}1' < file name Thanks, Arun (6 Replies)
Discussion started by: arun_maffy
6 Replies

7. Shell Programming and Scripting

Syntax error, not understanding the issue?

Close please. Refer to following thread: Sub Menu issues (2 Replies)
Discussion started by: Banned
2 Replies

8. UNIX for Dummies Questions & Answers

Understanding awk

I found this on an awk site and would like to know what it does: /CARS/{x="";next} {if(x)print x;x=$0} END{if(x)print x}' Does it mean if it finds the word cars it skips that line and then prints the next one? (4 Replies)
Discussion started by: newbie2010
4 Replies

9. Shell Programming and Scripting

awk : Need Help in Understanding a command

Hello I am working on a Change request and Stuck at a point. The below awk command is used in the function. float_test ( ) { echo | awk 'END { exit ( !( '"$1"')); }' } I understand that awk 'END' is used to add one line at the end and exit is used to end the script with an error... (4 Replies)
Discussion started by: rahul2662
4 Replies

10. Shell Programming and Scripting

Understanding awk 'expansion'

Heyas Recently i wanted to help someone with an awk script, but the end-script didnt work as expected. He wanted, if HOME was empty, to get the HOME of the current USER from /etc/passwd. At first i tried hardcoded with root: awk -F: '/^root/ {print $6}' /etc/passwd As that worked, i've... (4 Replies)
Discussion started by: sea
4 Replies
PROP_NUMBER(3)						   BSD Library Functions Manual 					    PROP_NUMBER(3)

NAME
prop_number, prop_number_create_integer, prop_number_create_unsigned_integer, prop_number_copy, prop_number_size, prop_number_unsigned, prop_number_integer_value, prop_number_unsigned_integer_value, prop_number_equals, prop_number_equals_integer, prop_number_equals_unsigned_integer -- numeric value property object LIBRARY
Property Container Object Library (libprop, -lprop) SYNOPSIS
#include <prop/proplib.h> prop_number_t prop_number_create_integer(int64_t val); prop_number_t prop_number_create_unsigned_integer(uint64_t val); prop_number_t prop_number_copy(prop_number_t number); int prop_number_size(prop_number_t number); bool prop_number_unsigned(prop_number_t number); int64_t prop_number_integer_value(prop_number_t number); uint64_t prop_number_unsigned_integer_value(prop_number_t number); bool prop_number_equals(prop_number_t num1, prop_number_t num2); bool prop_number_equals_integer(prop_number_t number, int64_t val); bool prop_number_equals_unsigned_integer(prop_number_t number, uint64_t val); DESCRIPTION
The prop_number family of functions operate on a numeric value property object type. Values are either signed or unsigned, and promoted to a 64-bit type (int64_t or uint64_t, respectively). It is possible to compare number objects that differ in sign. Such comparisons first test to see if each object is within the valid number range of the other: o Signed numbers that are greater than or equal to 0 can be compared to unsigned numbers. o Unsigned numbers that are less than or equal to the largest signed 64-bit value (INT64_MAX) can be compared to signed numbers. Number objects have a different externalized representation depending on their sign: o Signed numbers are externalized in base-10 (decimal). o Unsigned numbers are externalized in base-16 (hexadecimal). When numbers are internalized, the sign of the resulting number object (and thus its valid range) is determined by a set of rules evaluated in the following order: o If the first character of the number is a '-' then the number is signed. o If the first two characters of the number are '0x' then the number is unsigned. o If the number value fits into the range of a signed number then the number is signed. o In all other cases, the number is unsigned. prop_number_create_integer(int64_t val) Create a numeric value object with the signed value val. Returns NULL on failure. prop_number_create_unsigned_integer(uint64_t val) Create a numeric value object with the unsigned value val. Returns NULL on failure. prop_number_copy(prop_number_t number) Copy a numeric value object. If the supplied object isn't a numeric value, NULL is returned. prop_number_size(prop_number_t number) Returns 8, 16, 32, or 64, representing the number of bits required to hold the value of the object. If the supplied object isn't a numeric value, NULL is returned. prop_number_unsigned(prop_number_t number) Returns true if the numeric value object has an unsigned value. prop_number_integer_value(prop_number_t number) Returns the signed integer value of the numeric value object. If the supplied object isn't a numeric value, zero is returned. Thus, it is not possible to distinguish between ``not a prop_number_t'' and ``prop_number_t has a value of 0''. prop_number_unsigned_integer_value(prop_number_t number) Returns the unsigned integer value of the numeric value object. If the supplied object isn't a numeric value, zero is returned. Thus, it is not possible to distinguish between ``not a prop_number_t'' and ``prop_number_t has a value of 0''. prop_number_equals(prop_number_t num1, prop_number_t num2) Returns true if the two numeric value objects are equivalent. If at least one of the supplied objects isn't a numeric value, false is returned. prop_number_equals_integer(prop_number_t number, int64_t val) Returns true if the object's value is equivalent to the signed value val. If the supplied object isn't a numerical value or if val exceeds INT64_MAX, false is returned. prop_number_equals_unsigned_integer(prop_number_t number, uint64_t val) Returns true if the object's value is equivalent to the unsigned value val. If the supplied object isn't a numerical value or if val exceeds INT64_MAX, false is returned. SEE ALSO
prop_array(3), prop_bool(3), prop_data(3), prop_dictionary(3), prop_object(3), prop_string(3), proplib(3) HISTORY
The proplib property container object library first appeared in NetBSD 4.0. BSD
January 21, 2008 BSD
All times are GMT -4. The time now is 05:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy