Sponsored Content
Top Forums Shell Programming and Scripting Extract text between two character positions Post 302594480 by Scrutinizer on Tuesday 31st of January 2012 11:24:09 AM
Old 01-31-2012
Nothing to thank Smilie
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract character + 1

Hi, I would like extract from a file a character or pattern after ( n + 1) a specific pattern (n) . ( i supposed with awk) how could i do ? Thanks in advance. (1 Reply)
Discussion started by: francis_tom
1 Replies

2. Shell Programming and Scripting

Replace 9-16 positions of a text file.

Hi i am having text file like this 40000201040005200213072009000000700000050744820906904421 40069300240005200713072009000000067400098543630000920442 i want to replace 9-16 positions of my txt file...by 1234567...in a single line command i.e 0400052....should be replaced by... (2 Replies)
Discussion started by: suryanarayana
2 Replies

3. Shell Programming and Scripting

read the text file and print the content character by character..

hello all i request you to give the solution for the following problem.. I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print g go goo goog googl google like this Using unix Shell scripting... without using... (1 Reply)
Discussion started by: samupnl
1 Replies

4. Shell Programming and Scripting

Filling positions based on consensus character

I have files with hundreds of sequences with missing characters represented by a dash ("-"), something like this I need to go sequence by sequence and if a dash is found, it should be replaced with the most common character in that particular position. Thus, in my example the dash in the second... (6 Replies)
Discussion started by: Xterra
6 Replies

5. Shell Programming and Scripting

awk script replace positions if certain positions equal prescribed value

I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX. awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Discussion started by: halplessProblem
9 Replies

6. UNIX for Dummies Questions & Answers

find positions of a letter in a text file

Hi, I would like to know how can I get all the positions of a letter, let say letter C in a text file. sample input file: hcck pgog hlhhc desired output file: 2 3 13 Many thanks! (2 Replies)
Discussion started by: fadista
2 Replies

7. Shell Programming and Scripting

Insert text with Sed (in various positions)

Hello. I'm trying to insert text in various positions and I could only do that using pipes for each position. Example: cat file | sed -e 's#\(.\{5\}\)\(.*\)#\1:\2#g' | sed -e 's#\(.\{26\}\)\(.*\)#\1:\2#g' Insert ":" at position 5 and 26. it can be done in the same sentence, without using... (4 Replies)
Discussion started by: </kida>
4 Replies

8. Shell Programming and Scripting

seds to extract fields based on positions

Hi My file has a series of rows up to 160 characters in length. There are 7 columns for each row. In each row, column 1 starts at position 4 column 2 starts at position 12 column 3 starts at position 43 column 4 starts at position 82 column 5 starts at... (7 Replies)
Discussion started by: malts18
7 Replies

9. UNIX for Beginners Questions & Answers

Extracting strings at various positions of text file

Hi Team - I hope everyone has been well! I export a file from one of our source systems that gives me more information than I need. The way the file outputs, I need to extract certain strings at different positions on the file and echo them to another file. I can do this in batch easily,... (2 Replies)
Discussion started by: SIMMS7400
2 Replies
XmDataFieldSetHighlight(library call)									     XmDataFieldSetHighlight(library call)

NAME
XmDataFieldSetHighlight -- A DataField function that highlights text SYNOPSIS
#include <Xm/DataF.h> void XmDataFieldSetHighlight( Widget widget, XmTextPosition left, XmTextPosition right, XmHighlightMode mode); DESCRIPTION
XmDataFieldSetHighlight highlights text between the two specified character positions. The mode parameter determines the type of highlight- ing. Highlighting text merely changes the visual appearance of the text; it does not set the selection. widget Specifies the DataField widget ID left Specifies the position of the left boundary of text to be highlighted. This is an integer number of characters from the begin- ning of the text buffer. The first character position is 0 (zero). right Specifies the position of the right boundary of text to be highlighted. This is an integer number of characters from the begin- ning of the text buffer. The first character position is 0 (zero). mode Specifies the type of highlighting to be done. A value of XmHIGHLIGHT_NORMAL removes highlighting. A value of XmHIGH- LIGHT_SELECTED highlights the test using reverse video. A value of XmHIGHLIGHT_SECONDARY_SELECTED highlights the text using underlining. For a complete definition of DataField and its associated resources, see XmDataField(3). RELATED
XmDataField(3). XmDataFieldSetHighlight(library call)
All times are GMT -4. The time now is 08:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy