Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to open file in VI Editor at a specific line? Post 302258246 by skyineyes on Friday 14th of November 2008 05:58:32 AM
Old 11-14-2008
How to open file in VI Editor at a specific line?

i have following query

e.g i want the VI Editor cursor at line number N instead of 0 while opening the file from unix prompt.

vi filename ??????

Can anyone help?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to open files in VI editor

Hi, I unable to open any file using Vi editor,constantly getting the following error, vi log.log *** glibc detected *** malloc(): memory corruption: 0x081af510 ** uname -a Linux sekac092 2.6.5-7.244-bigsmp #1 SMP Mon Dec 12 18:32:25 UTC 2005 i686 athlon i386 GNU/Linux Also Note ls... (8 Replies)
Discussion started by: ennstate
8 Replies

2. Shell Programming and Scripting

How to give permissions to an open file in vi editor?

Hi all, I have a shell script that i started editing, only in the midst of which i tried to save the changes i found that the file wasnt been provided with write/execute permissions. I later have redone the changes and saved the file- Just curious to know if there was any command wherein... (5 Replies)
Discussion started by: Pankajakshan
5 Replies

3. UNIX for Advanced & Expert Users

getting error when open vi editor

helo I install my product for koren language I m uisng RHEL -4 operating system now problem is whenever I open any file vi filename I got following error on the screen E557: Cannot open termcap file 'vt100' not known. Available builtin terminals are: builtin_ansi ... (1 Reply)
Discussion started by: amitpansuria
1 Replies

4. Shell Programming and Scripting

Copying a line from one file to other using vi editor

Hi Guys, the command ":yy" copies the line but it can be pasted in the same file. How can it be done if I want to copy it in other file. (2 Replies)
Discussion started by: ajincoep
2 Replies

5. UNIX and Linux Applications

Notepad++ hang when open file edited in other text editor

Hi, I would like to ask about the notepad++ text editor application, Although there are alternative and more great text editor in linux (gedit, geany, jedit) im still using the notepad++ sometimes cause for some of my own reason one of those is the minimalist text(what i mean is notepad++ has a... (2 Replies)
Discussion started by: jao_madn
2 Replies

6. UNIX for Dummies Questions & Answers

Vi editor will not open new to UNIX. help please.

vi: syntax error at line 1: `)' unexpected when I try to vi into the /etc/vfstab, the return gives me the above error. how can resolve this so that I can have access into vi. (6 Replies)
Discussion started by: dovestar
6 Replies

7. Shell Programming and Scripting

Not able to read .csv file until open in vi editor

Hi, I am facing a problem regarding .csv file, my script does not read .csv file and if i open this file in vi editor and perform :wq option then only my script reads the .csv file. Thanks (5 Replies)
Discussion started by: ranabhavish
5 Replies

8. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

9. Shell Programming and Scripting

Overwrite specific column in xml file with the specific column from adjacent line

I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file. Here is the file. <!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies

10. UNIX for Beginners Questions & Answers

How to check if a file is open in editor?

Hi there! I'm developing a program that allows the user to open and edit files using both an editor and the terminal. Once the user has finished editing the file an update is sent to the logbook that compares the file before and after it was edited - this can only be done if the file is closed (I... (23 Replies)
Discussion started by: cherryTango
23 Replies
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)
All times are GMT -4. The time now is 10:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy