Sponsored Content
Top Forums Shell Programming and Scripting Find the length of each line in the file Post 302498712 by Suryaaravindh on Tuesday 22nd of February 2011 09:00:22 AM
Old 02-22-2011
Hi Anchal,

Thanks for your reply.

I have attached a sample file for which I am trying to find out the length. I tried the same code you have sent. I am not getting the correct output. This is the output I get:
562
576
The actual output is:
609
609

Thanks
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Fixing line length in a file

I have a file containing many lines all with varying lengths. I need each line in the file to be 100 characters in width but I can not find a way of doing this. I want to append to each line spaces to bring the width of the line to 100 but I need a generic way to work out how many spaces I need. ... (2 Replies)
Discussion started by: dbessell
2 Replies

2. UNIX for Dummies Questions & Answers

Need find a file based length

Can some please help me? Want to find files over 35 characters in length? I am running HPUX. Would it be possible with find? Thanks in advance (8 Replies)
Discussion started by: J_ang
8 Replies

3. Shell Programming and Scripting

Find the length of the longest line

Dear All, To find the length of the longest line from a file i have used wc -L which is giving the proper output... But the problem is AIX os does not support wc -L command. so is there any other way 2 to find out the length of the longest line using awk or sed ? Regards, Pankaj (1 Reply)
Discussion started by: panknil
1 Replies

4. Shell Programming and Scripting

find the length of file names in a directory?

Hi, how can find length of file names in a directory. Examp: I have a directory with name "d1". directory: d1 files: aaa.log bbb.log abcd.log abcdef.log I wold like out put like: file name legnth aaa.log 3 bbb.log 3 abcd.log 4 abcdef.log 5 (5 Replies)
Discussion started by: koti_rama
5 Replies

5. Shell Programming and Scripting

How To Find Length of a Field in XML File

Hi I have a xml file with below data...have to find the length of the filedvalues... <?xml version="1.0" encoding="ISO-8859-15" standalone="no"?><abc xmlns:xsi="http://www.w3.org/2000/XMLSchem... (3 Replies)
Discussion started by: naughty21
3 Replies

6. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies

7. Shell Programming and Scripting

separate file by line length

hi all, i'm new in unix.... i have question, sorry if it's missplace or too silly let say i have a file name testfile.log that contains data 000001 000002 000003 aaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbb cccccccccccccc dddddddddddddddddd 000004 i want to make new file... (3 Replies)
Discussion started by: venven
3 Replies

8. Shell Programming and Scripting

Check for length which exceeds specified length in a line

Hi, I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string. But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields. For ex: Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies

9. Shell Programming and Scripting

How to find the length of MP4 file in cygwin?

Hi, Apologies if I'm posting in wrong section. How can I find length (duration) of MP4 videos and m4a audio files on cygwin? I heard about mediainfo, ffmpeg, avconv utilities on Linux platform but not sure if they work (or available) on cygwin. Please advise, TIA (1 Reply)
Discussion started by: prvnrk
1 Replies
xcb_randr_query_output_property(3)				   XCB Requests 				xcb_randr_query_output_property(3)

NAME
xcb_randr_query_output_property - SYNOPSIS
#include <xcb/randr.h> Request function xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property(xcb_connection_t *conn, xcb_randr_output_t output, xcb_atom_t property); Reply datastructure typedef struct xcb_randr_query_output_property_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pending; uint8_t range; uint8_t immutable; uint8_t pad1[21]; } xcb_randr_query_output_property_reply_t; Reply function xcb_randr_query_output_property_reply_t *xcb_randr_query_output_property_reply(xcb_connection_t *conn, xcb_randr_query_output_property_cookie_t cookie, xcb_generic_error_t **e); Reply accessors int32_t *xcb_randr_query_output_property_valid_values(const xcb_randr_query_output_property_request_t *reply); int xcb_randr_query_output_property_valid_values_length(const xcb_randr_query_output_property_reply_t *reply); xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end(const xcb_randr_query_output_property_reply_t *reply); REQUEST ARGUMENTS
conn The XCB connection to X11. output TODO: NOT YET DOCUMENTED. property TODO: NOT YET DOCUMENTED. REPLY FIELDS
response_type The type of this reply, in this case XCB_RANDR_QUERY_OUTPUT_PROPERTY. 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). pending TODO: NOT YET DOCUMENTED. range TODO: NOT YET DOCUMENTED. immutable TODO: NOT YET DOCUMENTED. DESCRIPTION
RETURN VALUE
Returns an xcb_randr_query_output_property_cookie_t. Errors have to be handled when calling the reply function xcb_randr_query_output_prop- erty_reply. If you want to handle errors in the event loop instead, use xcb_randr_query_output_property_unchecked. See xcb-requests(3) for details. ERRORS
This request does never generate any errors. SEE ALSO
AUTHOR
Generated from randr.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_randr_query_output_property(3)
All times are GMT -4. The time now is 10:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy