Is there a way I can specify in printf (in ksh) the particular position I want to print a character, and also repeat a character from specified position:
eg . at position 1 - print "+"
from position 2- 32 print "-"
at position 33 print "$variable"
at position 64 print "+" and so on..
--------------------------------------------------------------------------------
Have to check in a file that the lines starting with 620 and 705
are ending at same posiotin.
82012345
62023232323
70523949558
62023255454
9999
In the above lines, i have to check the lines starting... (1 Reply)
Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Hello
I want to add some value at the specific position.
My file has data like
Hello
Welcome to UNIX Forums
Need Assistance
I want to add some value at the end but at same character position for all lines.
I want my output file to have data like :
Here '_' represents blanks.... (3 Replies)
I have two files abc.dat and sant.dat (Big file 60k rows)
for every line's 1,4 of abc.dat need to seach if this is present on 28,4 of sant.dat every line.
if its present the output needs to go to bde.dat
Example:
contents abc.dat
aaaa
bbbb
cccc
dddd
contents sant.dat
this is... (4 Replies)
Hi,
I have a fixed width file.
The way this file works is say for example there are 30 columns in it each with different sizes say 10,5,2, etc...
If data in a field is less than the field size the rest of it is loaded with spaces.
I would like an awk command to that would replace
I have... (8 Replies)
I have a file with 100 lines. On 50 th line , from position 5 to rest of the data , I need to change the occurrence of A to B and Occurrence of M to N.
Input file :
Line1
Line2
Line3
--
--
12345ABCDEFM
---
--
Line 100
Output
Line1
Line2 (40 Replies)
Need command for position based replace:
I need a command to replace with 0 for characters in the positions 11 to 20 to all the lines starts with 6 in a file.
For example the file ABC.txt has:
abcdefghijklmnopqrstuvwxyz
6abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz... (4 Replies)
Hi,
I need to remove line breaks from a file, but only the ones at specific position.
Input file:
this is ok
this line is divided at posit
ion 30. The same as this one,
also position 30
the rest of lines are ok
with different lengths
The longest ones are always s
plitted at same... (15 Replies)
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
LEARN ABOUT REDHAT
xmtextpostoxy
XmTextPosToXY(library call) XmTextPosToXY(library call)
NAME
XmTextPosToXY -- A Text function that accesses the x and y position of a character position
SYNOPSIS
#include <Xm/Text.h>
Boolean XmTextPosToXY(
Widget widget,
XmTextPosition position,
Position *x,
Position *y);
DESCRIPTION
XmTextPosToXY accesses the x and y position, relative to the upper left corner of the Text widget, of a given character position in the
text buffer.
In the case of horizontal writing, the position is the origin of the character. In the case of vertical writing, the position is the verti-
cal origin of the character.
widget Specifies the Text 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 (zero).
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 Text and its associated resources, see XmText(3).
RETURN
This function returns True if the character position is displayed in the Text widget; otherwise, it returns False, and no x or y value is
returned.
RELATED XmText(3).
XmTextPosToXY(library call)