General :: Vi Editor - Move Cursor To A Specified Line Number?

Dec 6, 2010

I am using Vi editor for editing and configuring my file.I am facing a little problem when there is long file like 3000 lines. Normally i use

Code:

:set number

in vi editor to visible my line number.The problem is when i have to go in the top of the file like say line number one I use k for it and to move down I use j which is too much time consuming. How can i jump directly my cursor to line number 2333 or line number 2600.

View 4 Replies


ADVERTISEMENT

OpenSUSE :: Vi Editor Ctrl-g Does Not Display Cursor Line Number

Aug 5, 2010

On Solaris UNIX, pressing Ctrl-g displays the line number for the cursor position.

i.e. line 1 0f n* --0%--

But, on suse Ctrl-g on displays the percentage only, not the hard line number

i.e. n* lines --8%--

Anyway I can make vi display hard line just like Solaris?

View 6 Replies View Related

Ubuntu :: Text Editor Column Editor And Regex Search/replace, Incrementing Number Insert?

Jul 25, 2011

On windows I really only used Notepad++ as my text editor, it had two features that I loved.What I need to accomplish is what I would do with Notepad++ column editor.I could have like 100 lines, and place the cursor at a column, and goto edit>column editor, and I could insert an incrementing number. (I could also pad the incrementing number with 0s, this was GREAT for making batch files among other things.)So each line at that column had a number higher than the previous line.The other feature that I used sometimes was a search/replace with regex patterns.Does anyone know of an editor that has those features for linux? I am mostly after the column editor insert feature but if you know of one with both features that would rock.

View 1 Replies View Related

General :: Getting The Line Of String From Previous Pipe Output By Line Number?

Feb 8, 2010

After running the following command, I get:

[root@yukiko /]# find / -iname .bashrc
/home/clamav/.bashrc
/home/vpopmail/.bashrc
/etc/skel/.bashrc
/root/.bashrc

But I would like to have a command that prints a specific line by supplying the command with the line number, for example:

[root@yukiko /]# find / -iname .bashrc | getline(2)
/home/vpopmail/.bashrc

Is there such a command on CentOS?

View 3 Replies View Related

General :: Sort By Line Size (number Of Characters In A Line)?

Jan 8, 2010

I want to sort a number of lines based on their size:

data:
-------
12345678
87654321
1234

[code]....

Should output as:
-----------------
1
2
12
21

[code]....

But i'm gettings this with sort
----------------
1
12
123
1234

[code]....

Can we sort the above "data" text, based on "number of characters" instead of "character order"?

View 8 Replies View Related

General :: Vi Editor To Move File Page?

May 10, 2011

I have a file of 200 pages. I want to move my cursor page wise. Suppose I want to move my cursor from last page of the file to up three pages.Is there any command to do it or I use "k" to move up?

View 3 Replies View Related

General :: How To Delete A Line At Specific Line Number

Jun 15, 2010

I m writing a script to delete a line at particular location.

But i m unable to use variable for specifying line number.

For example.

Code:

works fine and deletes 7th line from my file

But

Code:

gives following error.

Code:

View 7 Replies View Related

General :: Sed - Print Line Number Along With The Line?

Jan 30, 2011

I want to print the line number with the pattern of the line on a same line using multi-patterns in sed. But i don't know how to do it. For example, I have a file

abc
def
ghi

I want to print

1 abc
2 def
3 ghi

View 6 Replies View Related

General :: Touchpad On 2007 Macbook Pro - Move Cursor With The Tip Of Finger

May 28, 2011

I have recently installed Linux mint on my 2007 mac book pro and i found that my touch pad/track pad is not as sensitive as it was running the mac os. i can no longer move my cursor with the tip of my finger.

View 3 Replies View Related

Programming :: Insert Line Using Sed Or Awk At Line Using Line Number As Variable

Jul 25, 2011

I want to insert a line at a particular line number using sed or awk. where line number is not fixed and is in form of variable.

I want to use variable in sed or awk command.I tried something like below, but no luck.

View 7 Replies View Related

General :: Copy-paste From Editor To Command Line?

Dec 23, 2010

I am trying to upgrade PHP on our linux box ( CentOS ) I copied the configure command from the phpinfo and now I want to execute that.I am not able to copy the command from an editor in linux to the command prompt, clicking the wheel om my mouse does not work, neither does shift-insert or ctrl-shift-insert.It does work in the editor itself.Is there a way to do this ?Or is there a way to execute the command in linux while it is in the file ? Like a bat file on Windows ?

View 14 Replies View Related

General :: Get The Cursor Position Line At The Mid Of The Windows In Vim?

Mar 28, 2010

Suppose the cursor position line at bottom or top. What's the vim command to get the cursor position line at the mid of the windows in vim?

View 5 Replies View Related

Fedora :: Gnome-terminal Cursor Bug In Jove Editor?

Apr 3, 2010

I use an ancient text editor - Jove - that I maintain and update myself. It has worked fine on Fedora 6, 7 and 8 under gnome-terminal (known to the Jove editor as xterm). I just installed Fedora 12. When moving around a file being edited, the cursor often 'replicates' itself into a series of blocks (or underlines, depending on the cursor type setting) that seem to correspond to tab-stops. I initially thought it was stumbling on TABs, but it does this weirdness on long strings of blanks, as well. Clearing and redrawing the screen cleans things up until the next movement command.

I _intensively_ checked the code for anything that might be sensitive to the new termcap strings that have come with F12, but nothing. I could live with this if the underline cursor blinked so that I could SEE it in text, but alas, there ain't a blinking cursor. Just found out how to get the cursor blinking on another thread. But, I'd _still_ like go get the 'block' to work right. I compared the termcaps used by Jove in LF8 and LF9 and they were identical. Since the "7-block-wide" cursor bug happens in LF9, 10, 11, and 12 but not in LF8, I can confidently conclude that support for termcap/terminfo has been broken as of Fedora 9. And people ask me why I have four computers. (So I can run F8 F9 and F12 and compare their performance!).

View 2 Replies View Related

General :: Bring Cursor To 1st Char In Current Line (Command Mode)

Dec 4, 2010

Just in case someone can reply a silly question, I've quite forgot the vi/vim command to bring the cursor to the 1st char in the current line. I do remember that for bringing it to EOL is '$'.

View 14 Replies View Related

Programming :: Create File Listing In C++ That Will Generate Line Number On Every Line Of Code

Apr 11, 2010

I have a project due for my Intro to C++ class and we are suppose to generate a file listing that will take an input of a C++ source code with .cpp extension and make a copy of it with a .lst extention that will have a line number preceding each and every line.

View 12 Replies View Related

General :: Sed: Replace An Unknown Number Of Patterns On The Same Line?

Jul 5, 2011

I'm trying to use sed to search for a certain 'primary' pattern that may exist on several lines, with each primary pattern followed by an --unknown-- number of 'secondary' patterns.The lines containing the pattern start with: test(header_name)On that same line is an arbitrary number of strings that come after it.I want to move those strings over to their own lines so that they each are preceded by their own test(header_name).e.g. Original file (mytest.txt):

apples
test("Type1", "hat", "cat", "dog", "house");
bananas

[code]....

View 2 Replies View Related

General :: Sed - Csv Averages On Command Line - Take The Average Of All Rows With The Same 1st Number(key)

Jul 20, 2010

I have a big file full of records like this

1, 2, 4, 5, 6
1, 3, 5, 6, 3
1, 4, 5, 6, 6
2, 4, 5, 5, 5
2, 3, 4, 5, 2

anyway i need to take the average of all rows with the same 1st number(key). i.e.

1, 3, 4.66, 5.66, 5
2, 3.5, 4.5, 5, 3.5

I know this is something awk/sed would be great for, i just dont have enough experience with them to accomplish it, Also, what about averaging those columns together? so, after I output this to a file, id like to get another like:

1, 4.58
1, 4.125

The number of colums to add might not always be 4 either. EDIT: this might be easier to do in gnuplot, so I mainly just need an answer to the first part.

View 3 Replies View Related

General :: 'automate' That 'rows Selected' Preceded By Number Is Always Last Line

Jul 22, 2010

I'm not that familiar with sed and awk in order to be able to solve this problem on my own, so I'm calling on you for a bit of assistance. I'm writing a Nagios plugin to check our Oracle tablespaces and the output is given in one line like this: 1.04007771 TEMP 0 UNDOTBS1 .005340579 USERS 0 7 rows selected. I've been playing around with sed like below to delete the obsolete info and change every second space into a newline:

[code]...

how many tablespaces there are so I'd have to check all databases and 'hardcode' the tablespaces in my script. Is there any way to 'automate' this knowing that 'rows selected' preceded by a number is always the last line and using a sort of counter to auto-adjust the number to put in the -e 's/ / /2' part?

View 7 Replies View Related

General :: Command Line - Count Number Of Folders In A Drive Using System?

Apr 9, 2010

I need to organise an external HDD such that there is no more than 500 folders on it.

Ubuntu's "Properties" pane shows only the file count, not the folder count.

Is there a simple CLI line that will tell me the number of subdirectories?

View 3 Replies View Related

Ubuntu :: Get The Cursor To Move Outside The Virtual Box?

Feb 11, 2010

Installed linux mint in a virtual box (ose).Only problem,can't get the cursor out of the window,thus unabling me to unmount the iso so keeps reinstalling.Does anyone know how to set it so I can get the cursor to move outside the virtual box.

View 4 Replies View Related

General :: Command Line - Move Or Copy Selected File

Jul 16, 2011

How do I move around select a file and move or copy it. All tutorials I have seen are not simple enough.

View 7 Replies View Related

General :: Move To Previous System Date Using Command Line?

Sep 21, 2010

I want to know the command, so that i can move back two days i.e. all the changes i made during the two day is rolled back .

View 5 Replies View Related

General :: Find Out The Serial Number Of Hard Disk Through Command Line On OpenSuse 11.2 ?

Jul 12, 2010

I read this thread but

Code:
anisha@linux-uitj:~> su
Password:

[code]...

View 14 Replies View Related

Debian :: Turn Off System Beep When Can't Move Cursor?

Mar 29, 2010

It's annoying to get the system beep when I can't move the cursor anymore, is there a way to turn it off?

View 5 Replies View Related

Ubuntu :: Run Unity On Desktop And Cursor Disappears When Move

Jul 4, 2010

I installed the files from ppa:canonical-dx-team/une and installed Unity. Now, when I run Unity on my desktop and move my cursor on it, it disappears! Here is what I see in Terminal: [URL]

View 1 Replies View Related

Debian :: Kde Squeeze Can't Move Cursor To Lower Left Of Desktop

May 28, 2011

After playing one of the kde games in squeeze- breakout - which I had a hard time exiting - and even after I restarted the computer the cursor will not go to the lower left corner of the desktop, where the kde menu button is.

View 1 Replies View Related

Fedora :: System Grinds To Halt - Takes Several Seconds Just To Move Cursor

Aug 21, 2011

I'm running Fedora 14. I'm running a Athlon X2 with 4gb memory and nVidia 8400. I'm using the nvidia drivers ver 260. I'm running KDE 4.6. I've disabled desktop effects (when turnt on they work a charm, performance issues are the same either way). If I open any more than a few applications at once, the system grinds to a halt. even working with Kwrite is painful and it can take several seconds just to move the cursor, browsing the file is almost impossible.

When I have even 7 windows open X goes into a frenzy and sticks around 90% cpu usage. Even with no windows open if I move my mouse between screens X cpu usage stays between 50% and 90%. The system is unbearably slow. i have a XP Pro system with the same spec, lower GPU and I have no problems having 2/3 Visual Studios open, Photoshop, a few skype windows, Eclipse and the android emulator the system remains responsive but with this Linux box I can't even do basic stuff in Kwrite without it grinding to a haltJust.

View 4 Replies View Related

Ubuntu :: Cursor Move Within Limited Region Via Synergy During Dual Monitor?

Jan 24, 2011

I'm using Mac as a main machine and Ubuntu Netbook as a secondary. Although synergy gives me a good control over Netbook when it works without external monitor, but when I activate VGA monitor, I can only move around the limited region (details are below).

Phenomenon: Cursor can move in the external monitor's screen. No way to move cursor into the netbook's screen via synergy (it's possible from local touchpad/mouse) In the external monitor's screen, curosor moves only within limited region, which I'm guessing is as large as the size of netbook's screen.

Configuration: Use dual screens (uncheck "Same image in all monitors" in the tool "Monitor" on Ubuntu)

Env:
- OS: Ubuntu 10.04 Netbook edition
- HW: Starling Netbook (star3)

View 2 Replies View Related

Software :: Hear A Noise When Move My Cursor Or Open Menus In KDE - Not From Speakers ?

Nov 27, 2009

when I move the cursor over things or open menu's I hear a little sound inside my computer... ALMOST like its writing to disc,but the hard drive light indicates otherwise.

View 3 Replies View Related

Ubuntu :: Find And Move Commands On Large Number Of Files ?

Feb 21, 2011

We recovered a large number of files from a HD I messed up. I am attempting to move large numbers of files of a type e.g. .txt .jpg , into a folder by type to more easily sort through them.

Here are the commands I have mainly been trying with various edits:

Code:

Code:

So far the most common complaint I have gotten "missing arguments to execdir".

This is on Ubuntu 10.04

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved