Sponsored Content
Top Forums Shell Programming and Scripting Print column details from fixed width file using awk command Post 302929778 by kcdg859 on Friday 26th of December 2014 05:55:55 AM
Old 12-26-2014
What is i have to fetch only particular columns like $1,$2 with an extra condition like $5='BH' and $1=7518

Thanks for your quick reply.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Fixed Width file using AWK

I am using the following command at the Unix prompt to make my 'infile' into a fixed width file of 100 characters. awk '{printf "%-100s\n",$0}' infile > outfile However, there are some records with a special character "©" These records are using 3 characters in place of one and my record... (2 Replies)
Discussion started by: alok.benjwal
2 Replies

2. Shell Programming and Scripting

Comparing column of variable length anf fixed width file

Hi, I have two input files. File1: ID Name Place 1-234~name1~Newyork 1-34~name2~Boston 1-2345~name3~Hungary File1 is a variable length file where each column is seperated by delimitter "~". File2: ID Country 1-34<<11 SPACES>>USA<<7 spaces>> 1-234<<10 SPACES>>UK<<8... (5 Replies)
Discussion started by: manneni prakash
5 Replies

3. Shell Programming and Scripting

edit entire column from a fixed-width file using awk or sed

Col1 Col2 Col3 Col4 12 Completed 08 0830 12 In Progress 09 0829 11 For F U 07 0828 Considering the file above, how could i replace the third column the most efficient way? The actual file size is almost 1G. I am... (10 Replies)
Discussion started by: tamahomekarasu
10 Replies

4. Shell Programming and Scripting

Changing one column of delimited file column to fixed width column

Hi, Iam new to unix. I have one input file . Input file : ID1~Name1~Place1 ID2~Name2~Place2 ID3~Name3~Place3 I need output such that only first column should change to fixed width column of 15 characters of length. Output File: ID1<<12 spaces>>Name1~Place1 ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies

5. UNIX for Dummies Questions & Answers

Remove duplicates based on a column in fixed width file

Hi, How to output the duplicate record to another file. We say the record is duplicate based on a column whose position is from 2 and its length is 11 characters. The file is a fixed width file. ex of Record: DTYU12333567opert tjhi kkklTRG9012 The data in bold is the key on which... (1 Reply)
Discussion started by: Qwerty123
1 Replies

6. Shell Programming and Scripting

How to split a fixed width text file into several ones based on a column value?

Hi, I have a fixed width text file without any header row. One of the columns contains a date in YYYYMMDD format. If the original file contains 3 dates, I want my shell script to split the file into 3 small files with data for each date. I am a newbie and need help doing this. (14 Replies)
Discussion started by: bhanja_trinanja
14 Replies

7. Shell Programming and Scripting

To replace the value of the column in a fixed width file

I have a fixed with file with header & trailer length having the same length of the detail record file. The details record length of this file is 24, for Header and Trailer the records will be padded with spaces to match the record length of the file Currently I am adding 3 spaces in header... (14 Replies)
Discussion started by: ginrkf
14 Replies

8. Shell Programming and Scripting

Replace using awk on fixed width file.

All, I used to use following command to replace specific location in a fixed width file. Recently looks like my command stopped working as intended. We are on AIX unix. awk 'function repl(s,f,t,v) { return substr(s,1,f-1) sprintf("%-*s", t-f+1, v) substr(s,t+1) } NR<=10 {... (3 Replies)
Discussion started by: pinnacle
3 Replies

9. Shell Programming and Scripting

UNIX command -Filter rows in fixed width file based on column values

Hi All, I am trying to select the rows in a fixed width file based on values in the columns. I want to select only the rows if column position 3-4 has the value AB I am using cut command to get the column values. Is it possible to check if cut -c3-4 = AB is true then select only that... (2 Replies)
Discussion started by: ashok.k
2 Replies
xcb_xkb_list_components(3)					   XCB Requests 					xcb_xkb_list_components(3)

NAME
xcb_xkb_list_components - SYNOPSIS
#include <xcb/xkb.h> Request function xcb_xkb_list_components_cookie_t xcb_xkb_list_components(xcb_connection_t *conn, xcb_xkb_device_spec_t deviceSpec, uint16_t maxNames, uint8_t keymapsSpecLen, const xcb_xkb_string8_t *keymapsSpec, uint8_t keycodesSpecLen, const xcb_xkb_string8_t *keycodesSpec, uint8_t typesSpecLen, const xcb_xkb_string8_t *typesSpec, uint8_t compatMapSpecLen, const xcb_xkb_string8_t *compatMapSpec, uint8_t symbolsSpecLen, const xcb_xkb_string8_t *symbolsSpec, uint8_t geometrySpecLen, const xcb_xkb_string8_t *geometrySpec); Reply datastructure typedef struct xcb_xkb_list_components_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint16_t nKeymaps; uint16_t nKeycodes; uint16_t nTypes; uint16_t nCompatMaps; uint16_t nSymbols; uint16_t nGeometries; uint16_t extra; uint8_t pad0[10]; } xcb_xkb_list_components_reply_t; Reply function xcb_xkb_list_components_reply_t *xcb_xkb_list_components_reply(xcb_connection_t *conn, xcb_xkb_list_components_cookie_t cookie, xcb_generic_error_t **e); Reply accessors int xcb_xkb_list_components_keymaps_length(const xcb_xkb_list_components_reply_t *reply); xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator(const xcb_xkb_list_components_reply_t *reply); int xcb_xkb_list_components_keycodes_length(const xcb_xkb_list_components_reply_t *reply); xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator(const xcb_xkb_list_components_reply_t *reply); int xcb_xkb_list_components_types_length(const xcb_xkb_list_components_reply_t *reply); xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator(const xcb_xkb_list_components_reply_t *reply); int xcb_xkb_list_components_compat_maps_length(const xcb_xkb_list_components_reply_t *reply); xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator(const xcb_xkb_list_components_reply_t *reply); int xcb_xkb_list_components_symbols_length(const xcb_xkb_list_components_reply_t *reply); xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator(const xcb_xkb_list_components_reply_t *reply); int xcb_xkb_list_components_geometries_length(const xcb_xkb_list_components_reply_t *reply); xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator(const xcb_xkb_list_components_reply_t *reply); REQUEST ARGUMENTS
conn The XCB connection to X11. deviceSpec TODO: NOT YET DOCUMENTED. maxNames TODO: NOT YET DOCUMENTED. keymapsSpecLen TODO: NOT YET DOCUMENTED. keymapsSpec TODO: NOT YET DOCUMENTED. keycodesSpecLen TODO: NOT YET DOCUMENTED. keycodesSpec TODO: NOT YET DOCUMENTED. typesSpecLen TODO: NOT YET DOCUMENTED. typesSpec TODO: NOT YET DOCUMENTED. compatMapSpecLen TODO: NOT YET DOCUMENTED. compatMapSpec TODO: NOT YET DOCUMENTED. symbolsSpecLen TODO: NOT YET DOCUMENTED. symbolsSpec TODO: NOT YET DOCUMENTED. geometrySpecLen TODO: NOT YET DOCUMENTED. geometrySpec TODO: NOT YET DOCUMENTED. REPLY FIELDS
response_type The type of this reply, in this case XCB_XKB_LIST_COMPONENTS. This field is also present in the xcb_generic_reply_t and can be used to tell replies apart from each other. sequence The sequence number of the last request processed by the X11 server. length The length of the reply, in words (a word is 4 bytes). deviceID TODO: NOT YET DOCUMENTED. nKeymaps TODO: NOT YET DOCUMENTED. nKeycodes TODO: NOT YET DOCUMENTED. nTypes TODO: NOT YET DOCUMENTED. nCompatMaps TODO: NOT YET DOCUMENTED. nSymbols TODO: NOT YET DOCUMENTED. nGeometries TODO: NOT YET DOCUMENTED. extra TODO: NOT YET DOCUMENTED. DESCRIPTION
RETURN VALUE
Returns an xcb_xkb_list_components_cookie_t. Errors have to be handled when calling the reply function xcb_xkb_list_components_reply. If you want to handle errors in the event loop instead, use xcb_xkb_list_components_unchecked. See xcb-requests(3) for details. ERRORS
This request does never generate any errors. SEE ALSO
AUTHOR
Generated from xkb.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_xkb_list_components(3)
All times are GMT -4. The time now is 09:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy