Applications :: Delete A Word In A Vim File?

Jan 12, 2011

I have been looking around for a, "start new thread" button but cant seem to find it (which is my first question). My real question is, how do I delete a word in a vim file from the editor command? What I want to do is go to a specific line (36) and delete 3 words after my cursor

i.e :36 | 3dw

error: "3dw" is not a command. Ive tried ":d" this deletes teh whole line which is not what I want.

View 8 Replies


ADVERTISEMENT

Software :: Delete Top Lines Of A Text File Until A Word Is Met?

Jul 7, 2011

I need to chop of the top 30ish lines of several log files until a line starting with "Initialization completed."The trouble is that it's not always the same amount of lines that need to be deleted, and they don't always contain the same information, which is why I would need to delete everything priorhe line starting with "Initialization completed."Right now I have a little script I wrote based on looping each file through several "grep -v" commands with each known pattern of lines I want to ignore, but it is tedious and I have to inspect each file afterwards to make sure nothing is left from above "Initialization completed

View 3 Replies View Related

Programming :: Search For A Word In A File And Then Comment It Or Delete It?

Aug 9, 2009

I want to know that how can i search for a word in a file and then comment it or delete it. I know this command works.

sed 's/word/#word/'g inputfile > outputfile

But the lines in my input file are as under:

zone "abc.com" { ---- This line can be comment
type master; ----- This line repeat again and again in the file
file "abc.txt";
allow-query { any; }; -This line repeat again and again in the file
};

I want to know how can i comment a certain zone.

View 8 Replies View Related

General :: Search Word And Delete Only The Word And The Line Using Sed Command?

Jun 28, 2011

Want to search for ~ and delete it as well as to append the entire line to the above line. For Ex:

1111xxxx date Sandy area is ~around this area.3222xxx date There seems to ~left side of map, the colours are accurate (showing green areas)Even if I ~zoom in, the green parks, xxx3258 date The dammed up
~away, the "other" body of water varies ~blackNatural gas leaching.

IT MUST LOOK LIKE:

1111xxxx date Sandy area is around this area. 3222xxx date There seems to left side of map, the colours are accurate (showing green areas)Even if I zoom in, the green parks, xxx3258 date The dammed up away, the "other" body of water varies blackNatural gas leaching.

View 4 Replies View Related

Programming :: Bash Shell Script Read File Word By Word?

Jan 21, 2011

I have a output file look like this:
{"test1" : "test2", "test3" : "test4"},

How can I read word by word in each line?This is not working code:

a=0
while read word
do a=$(($a+1));

[code]...

View 14 Replies View Related

Programming :: Delete All Files With Specific Word In Filename?

May 21, 2011

I need a command to find the all files which filename contains the text "SomeText" and to delete that files!From /home/movie/wp-content/uploads/this folder I have lots of files and folders .Also I need that for folders and subfolders who contains some text in folder name "someTextInFolderName"

View 13 Replies View Related

Ubuntu :: Highlight Then Delete ; Misses First Letter In A Word / Resolve This?

Jun 26, 2011

When I highlight a word then delete it, the word is erased as expected. But when I highlight a word and begin typing a word to replace it (instead of deleting or hitting backspace), the first letter of the unwanted word does not erase... so I am required to watch my text very closely when editing.

For example: I'll type the word "fungus" and then highlight it and type the replacement word "mold" and when I look at the text, the word is "fmold". Am I the only one with this odd situation?

View 5 Replies View Related

Ubuntu :: Ibus Inactive With OpenOffice Word - KDEIbus Doesn't Work With Other GTK+ Applications

Dec 14, 2010

I've just installed Kubuntu 10.10 a couple of days a go. I've installed IBUS-UNIKEY and it works perfectly with Kopete and other applications. But I can not "activate" Ibus when working with OpenOffice Word. KDEIbus doesn't work with other GTK+ Applications.

View 3 Replies View Related

CentOS 5 Server :: Apachewithdocx - Microsoft Documents Wants To Open The File Like A Zip-file Not As Word Document

Jul 13, 2010

I've a webserver with a lot of documentary to serve. Some of the users have problems with the new microsoft documents like docx. Internet explorer 7 want to open the file like a zip-file not as word document. I've googelt around and found a solution that didn't work for me: [URL] I've added at /etc/mime.types

[Code]....

After a restart of httpd , nothing chance, always the same failure with internet explorer 7.

View 4 Replies View Related

Ubuntu :: Delete File - No Right Click Delete Option?

Feb 18, 2010

Why is there no Delete when I right click like there is with Windows in ubuntu? Pretty much everything else is there like new folder and so on Is there some way to add it? Also why when i delete something does it not ask me if I am sure that i want to delete that file?

View 6 Replies View Related

Ubuntu :: Delete Programs That Are Under The Applications Tab?

May 21, 2010

I'm extremely new to linux I've been a mac user for 6 years but recently purchased a new laptop that has windows 7 and immediately made the switch to ubuntu 10.04 after reading very good things. Problem is I like what I see very much but have no idea what the heck I'm doing and have ran into some problems.

1 How do you delete programs that are under the applications tab? I ask this because I downloaded songbird but my 32 bit system cannot open it so its there but cannot be used. Also how do you delete programs in general that you wont need?

2 How do I go about downloading songbird for the 32 bit OS?

3 I have tried to download the cpu vista meter but don't know how to install it once I have the files to extract.

4 When I boot up this machine I have the option to start up 4 different ubuntu OS' Ubuntu 2.6.32.22 and 2.6.32.21 plus their recovery modes. Question is did I screw something up during the partition and if not what is the difference between them and do I need both.

5 is there any way to access options regarding the sensitivity of the mouse pad it seems to be only for a hand held mouse

6 is there anyway to change the sounds played by empathy when messages are sent? are there any alternatives better than empathy?

7 I never partitioned a HDD before and was wondering if it was a good idea to set equal amounts of memory for windows and ubuntu. Also whats a safe way of giving more memory to a partition or removing a partition all together?

Thats it for now. I've ran commands through the terminal to get the cairo dock and that worked fine along with a few other apps.

View 9 Replies View Related

Programming :: Read Two Files Word By Word At A Time Using Any Loop By Shell Script?

Mar 4, 2010

Well, I am facing one issue:How can i read two files word by word at a time using any loop as i need word by word comparision in shell script?Please let me know pseudo code.

View 14 Replies View Related

Programming :: Bash Read Input Word For Word ?

May 4, 2010

I am pretty new to bash scripting...I am trying to write a script that will take an input and read it word for word and then DO something with it like echo. I have been able to find how to read word for word from a file but I don't know how to do it with input.

I was looking for something like

Code:

exit 0 The input would be A-Z a-z 0-9 and have a single space between each word.

View 2 Replies View Related

General :: Sed Append Word At End Of Line If Word Is Missing

Feb 19, 2010

I have to modify formsweb.cfg file in Oracle IAS.

Problem description

In formsweb.cfg file are two lines with labels archive_jini= and archive= at the beginning of line. After equal sign (=) is row of filenames of java archives delimited by coma(,). When I insert a new jar file in java directory, I have to append the very same name of jar file to both lines if that name is not yet present.

Example snippet from formsweb.cfg

View 2 Replies View Related

Fedora :: Modify The Applications Menu List To Add Or Delete Items?

Sep 19, 2010

How do I modify the Applications menu list to add or delete items? I have tried to right click but with no success.

View 6 Replies View Related

Software :: Icons Won't Delete From Applications>Sound And Audio Menu

Jan 9, 2011

I just recently uninstalled gtkpod and lmms using synaptic with a complete removal, and the icons are still there. When I click them they say: Error Could not launch 'Linux MulitMedia Studio' Failed to execute child process "/usr/bin/lmms" (No such file or directory)

View 2 Replies View Related

General :: How To Add Word At The End Of File

Sep 13, 2010

I'm trying to add a word at the end of a file that already contains data. I need to do it using a single command without human interaction cause it's gonna be part of an automatic script.

View 2 Replies View Related

General :: Edit Last Word On Each Line In File?

May 28, 2010

I have a file which a number at the end of each line. I need to change this number in the file to be correct, i.e. each time the number is 9 it needs to be 1, each time it is 233 it needs to be 2, etc... There is no pattern to the numbers currently in the list other than the same number appears only in a single line/group of lines, not throughout the file, but the replacements need to be sequential (but can be repeated an arbitrary number of times).

[Code]....

View 10 Replies View Related

Programming :: Printing A Specific Word Out Of A File?

Jan 6, 2011

so i have a file that has the following

file1.txt
ID1 age_11 dog_n3 parent_dog_n1
ID1 age_7 dog_n4 parent_dog_n3
ID1 dog_n5 age_4
ID1 dog_n6 age_4

[Code].....

As you can see i would like the output file to be just the dogs, not the otehr information. But because the information is mixed up how can i extract only the dogs? (i cant do and awk '{print }' because the dogs are found in colounm 2 or 3 or sometimes even 4.

View 9 Replies View Related

General :: Recursively Find A .doc File That Contains A Specific Word?

Aug 31, 2011

I'm using bash under Ubuntu.Currently this works well for the current directory:catdoc *.doc | grep "specificword" But I have lots of subdirectories with .doc files.How can I search for, let's say, "specificword" recursively?

View 2 Replies View Related

Ubuntu :: OpenOffice Crash When Trying To Open A Word File

Feb 26, 2010

I have a word file that i transfered to my ubuntu laptop, when i copied it here it was changed to a rtf file
When i try to open this file Openoffice opens up but then immediately freezes and when I click on quit it tells me openOffice is not responding. I just did an update and its still doing the same .

View 3 Replies View Related

Ubuntu Servers :: Word Reading Failure From File

Nov 14, 2010

I have 2 Ubuntu machines up & running on a small network. Both are running SAMBA servers. One several years old & has a rather old version of Ubuntu. The other, quite new & has a version about 9 months old.The newest has a problem. When working with large & complex Word documents, it will periodically generate an an error on the work station.

"Word failed reading from this fille (xxx specifies file we are working on). Please restore the network connection or replace the floppy disk drive". The it crashes Word & unsaved work is lost.The error never occurs when using the old server, only the new.

View 1 Replies View Related

Ubuntu :: Add Word To Each Line In A Gedit Text File?

Dec 8, 2010

Using the latest version of Ubuntu desktop on an emachine t5062 if it matters. I have a text file of keywords that is one-three words line after line for like 5000 lines. How would I go about adding a word to each line.Aside from typing it in or copying and pasting.If it can`t be done with Gedit I am all for using another program.

View 8 Replies View Related

Ubuntu :: Select Lines Containing Word And Copy To Another File?

May 31, 2011

I am trying to find a way to search a text file for a certain keyword and then select each line containing the word , copy and paste these lines into another text file. I can do this easily with UltraEdit but I cannot figure out how to do it in Jedit or Scite.

View 5 Replies View Related

General :: Getting Word Too Long Error While Sourcing Csh File?

Aug 12, 2011

I want to source this file but getting error message as word too long,kindly solve this question. set path=(/user/lib/usr/bin /bin/usr/ucb/etc/usr/ccs/bin/$path)

setenv DOCUMENTUM /home/kotresh/dctm
setenv DOCUMENTUM_SHARED $DOCUMENTUM/dctm_shared
setenv DM_HOME $DOCUMENTUM/product/6.0
setenv JAVA_HOME /home/kotresh/dctm/dctm_shared/java/1.6.0_17

[Code]....

View 1 Replies View Related

General :: Command To Sort A Text File By The Second Word?

May 14, 2010

What is the command to sort a text file by the second word?

View 4 Replies View Related

General :: Find A Phrase/word Recursivly In A File Tree?

Aug 31, 2010

how do I find a phrase/word recursively in a file tree in Linux?I tried find . -name ./* | grep my_phraseand I tried grep -r "register_long_arrays" *

View 5 Replies View Related

Ubuntu :: Removing A Word In A Multiple File Starting At The Dot Extension?

Aug 23, 2011

I would like to ask if someone knows a command or a script on how to rename a multiple file in the directory starting at the end of the filename or at the .extension( i would like to remove the last 11 character before the extension) for exampleBelow is the result of my command ls inside the directoryQuote:

BBC_In_footsteps_of_Alexander_the_mountain_20-v3veN2U__3I.mp4
BBC_In_the_footsteps_of_Alexander_Afghanistan_17-thAS28SWKKU.mp4
BBC_In_the_footsteps_of_Alexander_Alexandria_7-rQcjjpRwqw4.mp4

[code]....

View 9 Replies View Related

General :: Change All Number 10 In A Text File To Word Form?

Mar 20, 2011

I need to change all number 10 in a text file to word form, or in short from 10->ten. the thing is number 10 including in dates such as 10/22/1997 or 03-10-2011 should not be changed. im having some trouble because the file contains numbers like "price range from 10-50k".

this is just a sample.

name: john smith
birthday: 10-11-1995
date hired: 05/10/2010
expected salary: 10-50k
typing speed: 10 wpm

[Code].....

Using sed command is it possible to change like this..

View 11 Replies View Related

OpenSUSE :: Htdig Error: Unable To Read Word Database File

Oct 13, 2010

I built the indexes, but when I search I get this: Top-Level Documentation Application Manuals

openSUSE Documentation (en)
Htdig error: Unable to read word database file '/home/philip/.kde4/share/apps/khelpcenter/index//opensuse-manuals_en.words.db'

[code]...

the UNIX manual pages work, the Application Manuals show nothing, and the openSUSE Documentation shows the same error. This is the same no matter what I search for.

View 9 Replies View Related







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