Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dteditorgotoline(3) [hpux man page]

DtEditorGoToLine(library call)											    DtEditorGoToLine(library call)

NAME
DtEditorGoToLine -- move the insert cursor for a DtEditor widget to a specified line SYNOPSIS
#include <Dt/Editor.h> void DtEditorGoToLine( Widget widget, int lineNumber); DESCRIPTION
The DtEditorGoToLine function moves the insert cursor for the DtEditor widget to the beginning of the line specified by the lineNumber argument. The cursor can be moved to the last line by specifying DtEDITOR_LAST_LINE as the line number. If the line is not currently on- screen, the contents for the DtEditor widget are scrolled to display the new insertion position. The lineNumber argument is the number of the line in the file, counting from 1. If the lineNumber argument is less than 1, the insert cur- sor is placed at the beginning of the first line. If the argument is greater than the total number of lines, the cursor is placed at the last line of text. The insert cursor can be moved to a specific character position with DtEditorSetInsertionPosition(3). The DtNtopCharacter resource can be used to control which line is displayed at the top of the DtEditor widget. The widget argument specifies the DtEditor widget ID. The lineNumber argument specifies the line number within the DtEditor widget. For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). RETURN VALUE
The DtEditorGoToLine function returns no value. SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorSetInsertionPosition(3). DtEditorGoToLine(library call)

Check Out this Related Man Page

DtEditorSetInsertionPosition(library call)								DtEditorSetInsertionPosition(library call)

NAME
DtEditorSetInsertionPosition -- set the position of the insert cursor in a DtEditor widget SYNOPSIS
#include <Dt/Editor.h> void DtEditorSetInsertionPosition( Widget widget, XmTextPosition position); DESCRIPTION
The DtEditorSetInsertionPosition function sets the insertion cursor position of the DtEditor widget. The current position of the insertion cursor can be retrieved with DtEditorGetInsertionPosition(3). The last text position of the DtEditor widget can be retrieved with DtEditor- GetLastPosition(3). The widget argument specifies the DtEditor widget ID. The position argument specifies the position of the insertion cursor. This is an integer number of characters from the beginning of the text buffer. The first character position is zero. Values greater than the last position place the cursor at the last position (that is, at the end of the text). For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). RETURN VALUE
The DtEditorSetInsertionPosition function returns no value. SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorGetInsertionPosition(3), DtEditorGetLastPosition(3). DtEditorSetInsertionPosition(library call)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cursor positioning thru VI Editor

Is there a way that I can position cursor at say line 23, column 2? Thank you in advance. (8 Replies)
Discussion started by: Latha Nair
8 Replies

2. Shell Programming and Scripting

insert a line in a file

Hello guys, Need to know how to insert a line at top of the file, without using temp files. Can we do it on the fly? Regards, Rishi (7 Replies)
Discussion started by: RishiPahuja
7 Replies

3. Shell Programming and Scripting

adding text to a file between lines

Suppose content of my first file: first line second line third line How can i insert text between "first line" & "second Iline" Any help?????/ (7 Replies)
Discussion started by: bishweshwar
7 Replies

4. UNIX for Dummies Questions & Answers

help me to to insert data

hi, am new to unix can any one help me to insert data to afile to a specified column. ie to an output file with csv format i should insert some data to 2,3,4 fileds and the data in those fields should move to next fields eg: output file asd,12,12,12,12,1,2,1,1,1,1,1... (10 Replies)
Discussion started by: babu@shell
10 Replies

5. Shell Programming and Scripting

overwrite specific lines in a file

Hi all, I am trying to overwrite some lines of a very big file. I know the number of the line but I don't know how to point the cursor on its beginning. there is an option to notice the offset in lines? thanks! (7 Replies)
Discussion started by: csecnarf
7 Replies

6. Shell Programming and Scripting

insert new line at found chars

Hey gang, I have: XXZZXXZZXX 123 asdaffggh dfghyrgr ertyhdhh XXZZXXZZXX 234 sdg XXZZXXZZXX 456 gfg fggfd That is all on one line. Very simply put I want to do is something like: sed s'/XXZZXXZZXX /\n/g' or tr 'XXZZXXZZXX ' '/n' I have tried various things but can never get the desired... (6 Replies)
Discussion started by: crowman
6 Replies

7. Shell Programming and Scripting

search a line and insert string into specific at position

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)
Discussion started by: daikeyang
9 Replies

8. Shell Programming and Scripting

regarding about printing line number

Hello, I am testing some data to get line number at cursor position 9 and found some problem, the code is below.Assume we got 3 attribute. At second attribute, there are some data(eg.A41/A6) missing like at the fourth and six line 11006 A41 1888 11006 ... (7 Replies)
Discussion started by: davidkhan
7 Replies

9. UNIX for Dummies Questions & Answers

grep a file from a given line only

Hi all, I'm looking for the line number where the string "total" appears. I know that this is after a given line number which I know. So I would like to know the line number of the first "total" after the line X. Is it possible to use grep a file from a given line only? Thank you, (7 Replies)
Discussion started by: f_o_555
7 Replies

10. Shell Programming and Scripting

insert character in particular position.

I want to insert space in 7th position of all the lines usign vi editor or sed command Input file 12345689010 abcdefghijk . . Output file 123456 89010 abcdef ghijk . . (7 Replies)
Discussion started by: Jairaj
7 Replies

11. Shell Programming and Scripting

how to insert a string as a first line of the file

Hi I need to update a number of existing files and insert #!/bin/ksh line a the first line of the file. Is there any awk or sed command which would help me to do that instead of doing it manually? Thanks a lot -A (10 Replies)
Discussion started by: aoussenko
10 Replies

12. Shell Programming and Scripting

Insert at the beginning of odd lines

Hello people, I am trying with sed to insert some text at the beginning of each odd line of a file but no luck. Can you please help. Awk is also suitable but I am not very familiar with it. Thank you in advance for any help. (7 Replies)
Discussion started by: drbiloukos
7 Replies

13. Shell Programming and Scripting

How to insert text using a second file in Linux

How can i insert text at a particular line number or before/after a search pattern? The text i want to insert is of 8-10 lines including new line characters. I have stored this text in a separate file. I know i can use sed '{/pattern/|/regexp/|n}{i|a|c}<text to be inserted>' file But i want... (7 Replies)
Discussion started by: abhitanshu
7 Replies

14. Shell Programming and Scripting

How to insert the content of a file into another file?

I have the two files. And i want the each line of first file to be inserted in the beginning of second file each line and the final output should be like this. Could anyone help me on this? cat file1 1 2 3 4 cat file2 text1 text2 text3 text4 final_output 1 text1 2 text2 3 text3... (9 Replies)
Discussion started by: thomasraj87
9 Replies

15. UNIX for Beginners Questions & Answers

Inserting n characters to beginning of line if match

I would like to insert n number of characters at the beginning of each line that starts with a given character. If possible, I would be most appreciative for a sed or awk solution. Given the data below, I would like to be able to insert either 125 spaces or 125 "-" at the beginning of every line... (6 Replies)
Discussion started by: jvoot
6 Replies