Sponsored Content
Full Discussion: Character count in UNIX!
Top Forums Shell Programming and Scripting Character count in UNIX! Post 302777399 by nikesh29 on Thursday 7th of March 2013 11:46:20 PM
Old 03-08-2013
Hi,
Thanks for your quick reply.
So when we take a character count do we have to subtract 1 from the output given by wc -c command?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to count no of occurences of a character in a string in UNIX

i have a string like echo "a|b|c" . i want to count the | symbols in this string . how to do this .plz tell the command (11 Replies)
Discussion started by: kamesh83
11 Replies

2. Shell Programming and Scripting

Unix shll script for character count findings?

Hi, iam presenting the input text file format.Of this i need the character count of the number of characters present in each file.The attached file is a combination of 3 text file.each text file starts at record 1 - 34, then the next tetx file starts. What i need is the character count of each... (2 Replies)
Discussion started by: sethunath
2 Replies

3. Shell Programming and Scripting

count character

Hi, I am reading a string from a file. now i want to count the number of chareacter in the string and if it is more then 8 capture only last 8 characters. ex. string=mypassword <<do something>> output should be: string=password Thanks for you help. (13 Replies)
Discussion started by: myguess21
13 Replies

4. UNIX for Dummies Questions & Answers

character count of my document?

In Vi, how do I get a character count of my document? Also, in: ls -l I see the number 435, is that in bytes? Thanks:) (2 Replies)
Discussion started by: JudoMan
2 Replies

5. UNIX for Advanced & Expert Users

character count per record

Hello can someone please advise. I need to send records in a file that are over 10,000 characters long to a seperate file. Any ideas? Thanks (2 Replies)
Discussion started by: Dolph
2 Replies

6. Shell Programming and Scripting

Count number of occurences of a character in a field defined by the character in another field

Hello, I have a text file with n lines in the following format (9 column fields): Example: contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Discussion started by: s052866
3 Replies

7. Shell Programming and Scripting

awk - count character count of fields

Hello All, I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form 1|121|asda|434|thesi|2012|05|24| 1|343|unit|09|best|2012|11|5| I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
Discussion started by: PikK45
6 Replies

8. Shell Programming and Scripting

Finding a certain character in a filename and count the characters up to the certain character

Hello, I do have folders containing having funny strings in their names and one space. First, I do remove the funny strings and replace the space by an underscore. find . -name '* *' | while read file; do target=`echo "$file" | sed 's/... (2 Replies)
Discussion started by: tempestas
2 Replies

9. UNIX for Beginners Questions & Answers

How do I remove leading spaces in UNIX when count of space character is not fixed? Example below-

Script showStreamsGLIS$reg.$env.ksh gives me output as below- Job Stime Etime Status ExitCode GLIS-AS-S-EFL-LOCK-B ----- ----- OI 103313880/0 GLIS-ALL-Q-EOD-FX-UPDT-1730-B ----- ----- TE 0/0 GLIS-TK-S-BWSOD-B ... (8 Replies)
Discussion started by: Tanu
8 Replies

10. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies
xcb_dri2_get_buffers(3) 					   XCB Requests 					   xcb_dri2_get_buffers(3)

NAME
xcb_dri2_get_buffers - SYNOPSIS
#include <xcb/dri2.h> Request function xcb_dri2_get_buffers_cookie_t xcb_dri2_get_buffers(xcb_connection_t *conn, xcb_drawable_t drawable, uint32_t count, uint32_t attachments_len, const uint32_t *attachments); Reply datastructure typedef struct xcb_dri2_get_buffers_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t width; uint32_t height; uint32_t count; uint8_t pad1[12]; } xcb_dri2_get_buffers_reply_t; Reply function xcb_dri2_get_buffers_reply_t *xcb_dri2_get_buffers_reply(xcb_connection_t *conn, xcb_dri2_get_buffers_cookie_t cookie, xcb_generic_error_t **e); Reply accessors xcb_dri2_dri2_buffer_t *xcb_dri2_get_buffers_buffers(const xcb_dri2_get_buffers_request_t *reply); int xcb_dri2_get_buffers_buffers_length(const xcb_dri2_get_buffers_reply_t *reply); xcb_dri2_dri2_buffer_iterator_t xcb_dri2_get_buffers_buffers_iterator(const xcb_dri2_get_buffers_reply_t *reply); REQUEST ARGUMENTS
conn The XCB connection to X11. drawable TODO: NOT YET DOCUMENTED. count TODO: NOT YET DOCUMENTED. attachments_len TODO: NOT YET DOCUMENTED. attachments TODO: NOT YET DOCUMENTED. REPLY FIELDS
response_type The type of this reply, in this case XCB_DRI2_GET_BUFFERS. 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). width TODO: NOT YET DOCUMENTED. height TODO: NOT YET DOCUMENTED. count TODO: NOT YET DOCUMENTED. DESCRIPTION
RETURN VALUE
Returns an xcb_dri2_get_buffers_cookie_t. Errors have to be handled when calling the reply function xcb_dri2_get_buffers_reply. If you want to handle errors in the event loop instead, use xcb_dri2_get_buffers_unchecked. See xcb-requests(3) for details. ERRORS
This request does never generate any errors. SEE ALSO
AUTHOR
Generated from dri2.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_dri2_get_buffers(3)
All times are GMT -4. The time now is 01:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy