Sponsored Content
Top Forums UNIX for Dummies Questions & Answers What is the difference in this two awk command? Post 302974226 by later_troy on Thursday 26th of May 2016 03:50:20 PM
Old 05-26-2016
Wonderful !!! Thanks for examples.
 

10 More Discussions You Might Find Interesting

1. AIX

difference between ls -b and ls command

hi anyone please tell me what is the difference between ls -b command and ls command. (1 Reply)
Discussion started by: sathish2win
1 Replies

2. Programming

Difference between cp and mv linux command

Hi, I am facing one problem only with mv command not with cp command. I have a test program #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/mount.h> #include <fcntl.h> #include <errno.h> int sync_file(char *file) { FILE *fp=NULL;... (6 Replies)
Discussion started by: dharshini123
6 Replies

3. Shell Programming and Scripting

awk command in script gives error while same awk command at prompt runs fine: Why?

Hello all, Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val: > cat getnon0file.sh #!/bin/bash this="getnon0file.sh" USAGE=$this" InFile="xyz.38" Min="0.05" # awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies

4. UNIX for Dummies Questions & Answers

which command difference

What is the difference between (unix-system “which ) and which commands. For example when I use the (unix-system “which visual_elite) command I get the following result: /home/vhdl/edatools/mentor/visualelite/VisualElite-4.2.1/Linux2.4/bin/visual_elite When I do the same on... (1 Reply)
Discussion started by: mihaelab
1 Replies

5. Shell Programming and Scripting

AWK Script and Commandline difference

Hey there, I just stumbled upon a difference between using awk on the commandline and using it in a shellscript. I have a variable, e.g.: PROG=vim then i want to check if the package with this name is installed: TEMPVAL=$(dpkg -l | awk '{ if ($2 == "$PROG") print $2 }') (Im using... (10 Replies)
Discussion started by: MrSnail
10 Replies

6. UNIX for Dummies Questions & Answers

command difference - find

Hi, What is the difference between these two? find /some_dir -type f -exec chmod 070 {} \; and chmod 070 `find /some_dir -type f` Thanks (5 Replies)
Discussion started by: lamont
5 Replies

7. Shell Programming and Scripting

Simple awk command to compare two files and print first difference

Hello, I have two text files, each with a single column, file 1: 124152970 123899868 123476854 54258288 123117283 file 2: 124152970 123899868 54258288 123117283 122108330 (5 Replies)
Discussion started by: LMHmedchem
5 Replies

8. Shell Programming and Scripting

Awk: What is the difference between: X[a,b,c] - X[a][b,c] - X[a][b][c]

I have awk appearing to behave inconsistently. With the same variable it will give the message: fatal: attempt to use array `X' in a scalar context and, if I try to correct that, then: fatal: attempt to use a scalar value as array I'm using a three dimensional array. There seems to be a... (2 Replies)
Discussion started by: Fustbariclation
2 Replies

9. Shell Programming and Scripting

Difference in awk output and while

so, im going over one of my scripts and trying to optimize it. i have a code like this: cksum sjreas.py | awk '{prinnt $1$2}' This does what I need. However, i dont want to call the external command awk. so im doing this: cksum sjreas.py | while OFS=' ' read v1 v2 ; do printf... (4 Replies)
Discussion started by: SkySmart
4 Replies

10. Shell Programming and Scripting

awk to calculate difference of split and sum the difference

In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13. I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)
Discussion started by: cmccabe
2 Replies
xcb-examples(3) 						   XCB examples 						   xcb-examples(3)

NAME
xcb-examples - manpage examples DESCRIPTION
Many of the XCB manpages contain example code. These examples intend to explain how to use one particular part of XCB. They almost never represent a standalone (or even useful) program - X11 programs are relatively involved and thus beyond the scope of a manpage example. ENVIRONMENT
Every example assumes you have an xcb_connection and possibly other variables at hand. For illustrating how xcb_get_property works, you need the window of which you want to get the property, for example. To make it clear that these variables are your responsibility, these examples consist of a single function which takes the necessary variables as parameters. FLUSHING
Flushing means calling xcb_flush to clear the XCB-internal write buffer and send all pending requests to the X11 server. You don't explic- itly need to flush before using a reply function (like xcb_query_pointer_reply), but you do need to flush before entering the event loop of your program. There are only two cases when XCB flushes by itself. The first case is when its write buffer becomes full, the second case is when you are asking for the reply of a request which wasn't flushed out yet (like xcb_query_pointer_reply). This last point also includes xcb_request_check(). Please note that waiting for an event does NOT flush. Examples generally include the xcb_flush call where appropriate (for example after setting a property). Therefore, including these func- tions and calling them in your application should just work. However, you might get better results when flushing outside of the function, depending on the architecture of your program. COMPILATION
If an example does not compile (without warnings) when using -std=c99, that is considered a documentation bug. Similarly, not handling errors or leaking memory is also considered a documentation bug. Please inform us about it on xcb@lists.freedesktop.org. CODING STYLE
Every example uses 4 spaces for indention. Comments are in asterisks, like /* this */. No line is longer than 80 characters (including indention). SEE ALSO
xcb_connect(3), xcb_get_property(3), xcb_flush(3) AUTHOR
Michael Stapelberg <michael+xcb at stapelberg dot de> XCB
2011-12-11 xcb-examples(3)
All times are GMT -4. The time now is 12:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy