Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [Solved] Find position of character with awk Post 302844397 by Indra2011 on Monday 19th of August 2013 07:08:44 AM
Old 08-19-2013
Thanks a lot Krish!!!!!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find if a position is between a given start and end position

Hi, I am a newbie in unix programming so maybe this is a simple question. I would like to know how can I make a script that outputs only the values that are not between any given start and end positions Example file1: 2 30 40 80 82 100 file2: ID1 1 ID2 35 ID3 80 ID4 81 ID6... (9 Replies)
Discussion started by: fadista
9 Replies

2. UNIX for Dummies Questions & Answers

Req 1-liner for Awk, et al to find str position

Hi, I'm trying to find the position of a series of numbers within a large text file. The numbers are separated by spaces. This works fine: type Huge_File.txt | gawk "{print index($0,"255")}" But this does not: type Huge_File.txt | gawk "{print index($0,"188 028 239 160 016 190 137... (4 Replies)
Discussion started by: Lemming42
4 Replies

3. Shell Programming and Scripting

Delete character in determinate position with sed/awk

Hello. I'm trying to delete one character in determinate position. Example: qwEtsdf123Ecv34 <delete character in positión 3> Result: qwtsdf123Ecv34 Plase, help me. Thanks (4 Replies)
Discussion started by: maria_florencia
4 Replies

4. Shell Programming and Scripting

How to find character position in file?

how to find character positionin file? i.e string = "123X568" i want to find the position of character "X". Thanks (6 Replies)
Discussion started by: LiorAmitai
6 Replies

5. Shell Programming and Scripting

Find position of character in multiple strings in a file

Greetings. I have a file with information like this: AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU? AMNDHRKEEU?AMNDHREOEU? AMNDHREU?AHRKEOEU?AMNDHRKEU?AMNDKEOEU? What I need to extract is the position, in every line, of every occurrence of '?' A desired output would be something... (6 Replies)
Discussion started by: Twinklefingers
6 Replies

6. Shell Programming and Scripting

Find character and Replace character for given position

Hi, i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command. thanks in advance, Sara (9 Replies)
Discussion started by: Sara183
9 Replies

7. Shell Programming and Scripting

[Solved] Find and replace till nth occurence of a special character

Hi, I have a requirement to search for a pattern in each line in a file and remove the in between words till the 3rd occurrence of double quote ("). Ex: CREATE TABLE "SCHEMANAME"."AMS_LTV_STATUS" (Note: "SCHEMANAME" may changes for different schemas. Its not a fixed value) I need to... (2 Replies)
Discussion started by: satyaatcgi
2 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Awk: count occurrence of each character for every field

Hi, let's say an input looks like: A|C|C|D A|C|I|E A|B|I|C A|T|I|B as the title of the thread explains, I am trying to get something like: 1|A=4 2|C=2|B=1|T=1 3|I=3|C=1 4|D=1|E=1|C=1|B=1 i.e. a count of every character in each field (first column of output) independently, sorted... (4 Replies)
Discussion started by: beca123456
4 Replies

9. Shell Programming and Scripting

To find nth position of character in string

Hi guyz i want to know nth position of character in string. For ex. var="UK,TK,HK,IND,AUS" now if we see 1st occurance of , is at 3 position, 2nd at 6,..4th at 13 position. 1st position we can find through INDEX, but what about 2nd,3rd and 4th or may be upto nth position. ? In oracle we had... (2 Replies)
Discussion started by: Jonty Immortal
2 Replies

10. Shell Programming and Scripting

awk sed to repeat every character on same position from the upper line replacing whitespace

Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position? I am asking this because the file I have doesn't always follow a pattern. For example the file I have is the result of a command to obtain windows ACLs: icacls C:\ /t... (5 Replies)
Discussion started by: nakaedu
5 Replies
XmTextFieldPosToXY(library call)										  XmTextFieldPosToXY(library call)

NAME
XmTextFieldPosToXY -- A TextField function that accesses the x and y position of a character position SYNOPSIS
#include <Xm/TextF.h> Boolean XmTextFieldPosToXY( Widget widget, XmTextPosition position, Position *x, Position *y); DESCRIPTION
XmTextFieldPosToXY accesses the x and y position, relative to the upper left corner of the TextField widget, of a given character position in the text buffer. widget Specifies the TextField widget ID position Specifies the character position in the text for which the x and y position is accessed. This is an integer number of characters from the beginning of the buffer. The first character position is 0. x Specifies the pointer in which the x position is returned. The returned position is the distance from the left side of the wid- get to the left border of the character. This value is meaningful only if the function returns True. y Specifies the pointer in which the y position is returned. The returned position is the distance from the top of the widget to the character's baseline. This value is meaningful only if the function returns True. For a complete definition of TextField and its associated resources, see XmTextField(3). RETURN
This function returns True if the character position is displayed in the TextField widget; otherwise, it returns False, and no x or y value is returned. RELATED
XmTextField(3). XmTextFieldPosToXY(library call)
All times are GMT -4. The time now is 10:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy