General :: Next Word Of A Particular Word ?

Feb 9, 2011

In linux is there a way to find the next word of a particular word of a file. grep displays entire line of the particular word. But i want only the exact next word of that particular word.is there any command for that.

View 13 Replies


ADVERTISEMENT

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

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

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 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 :: 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

OpenSUSE Install :: Arial-KOI Type, The "è" Word Is Replaced By A "X" Word?

Aug 3, 2011

Found a font bug: in the Arial-KOI type, the "è" word is replaced by a "X" word...

View 3 Replies View Related

General :: How To Convert Word - Doc - To PDF ?

Jun 24, 2010

I have a set of files in .doc format, that need to be converted to .pdf format. I am using Ubuntu linux.

View 7 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 :: Word Autocompleteion In Vi

Jan 29, 2010

I want to add word autocompletion feature to my vi editor.my .dict file contains C++ keyword(near about 90 words).

View 2 Replies View Related

General :: How To Turn Off Word-wrap In Less

Apr 19, 2011

How can I make the less utility in Linux not wrap lines?

Long version: Often I need to view huge CSV files using less with hundreds of columns. I frequently only care about the first couple columns. However, word wrap causes one line to become several lines even on wide-screen monitors.

View 2 Replies View Related

General :: Bold Word In Mail

Jul 21, 2010

I have a script to output the result ( eg. echo $x ) , then send result to my Lotus mail server , can advise if I want to bold the words in the mail , what can i do ? thx

View 2 Replies View Related

General :: Deleting A Line Containing The Word?

Jun 10, 2010

what would be the syntax to delete a line containg the word "word" from the file "file" i want to delete the whole line and not only the word...

View 6 Replies View Related

General :: How To Convert Word Or Pdf To Html

Nov 11, 2009

I want to use an utility to convert word,pdf to html with same formatting. that utility able to run in commandline also. i want to integrate it in web page. so which utility is suitable for it

View 9 Replies View Related

General :: Extract The First Word Following A String?

Aug 22, 2010

I need a bash script that can read a file, say example.txt search for the string "This is my example string" and save whatever word/number comes immediately after it to a variable, var.

Example:
blah blah
blah This is my example string extracthere is a very nice word.
blah blah

There are two constraints:1. This needs to assume as little as possible about the nature of the known string "This is my example string" and the word that follows it. I am trying to keep my code adaptable.2. Speed is valuable. This shell will be executed dozens if not hundreds of times so speed is very desirable. I thought I read that some commands are faster than others.

View 14 Replies View Related

General :: Get A Word From A Line Using Sed Or Grep

Mar 30, 2010

I am trying to get a word from a line using sed. Following is the line which I want to use.

inet addr:10.245.86.15 Bcast:10.245.87.255 Mask:255.255.254.0 inet6 addr: fe80::1031:3dff:fe01:55e1/64 Scope:Link

From the above line, I need the ip address like 10.245.86.15 only.

View 4 Replies View Related

General :: Inserting Same Word On Different Lines In Vi

Aug 2, 2011

I am having problem in adding a word in same place on different line in vi editor (/bin/bash).

View 4 Replies View Related

General :: Keep Duplicates Based On First Word Only

Mar 11, 2011

I have a large file and want to keep lines which are duplicates, but the test for duplicates is performed only on the first blank-delimited word.

View 6 Replies View Related

General :: SED - Substitute A Word Only In A Certain Line

Feb 2, 2010

I tried to use the command:

sed -i ''$line_number',/port/s/port/portMARKED/' file

to substitute the word "port" by the word "portMARKED" at the specific line that is saved in "line_number". The substitution happens, but it is copying my line twice... and I have no idea why... I need to make a single substitution of one word for another at a certain line in my text file. Would somebody know how I could do that?

View 3 Replies View Related

General :: Converting Word Document To TIFF?

Apr 26, 2011

I have a CentOS 5.6 box and was wondering if there are any tools for Linux that can convert a Microsoft Word document to a TIFF file?

View 2 Replies View Related

General :: Extract Images From Word Document?

May 23, 2011

Is there a (Linux) command-line tool to extract all the images from a MS Word document, (preferably one that could handle the .docx format)?

View 1 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

General :: Search A Grep For A Magic Word?

Feb 16, 2011

I am using ascript for general users to back up usb drives to lto4 tapes.. I wish to ahve some error checking to check IF is there is a tape in the tape drive to check for the tape:

if i do a
sudo mt -f /dev/st0 status
i will get back a
mt: /dev/st0: rmtioctl failed: Input/output error
if there is no tape in the drive or
sudo mt -f /dev/st0 status

[code].....

View 4 Replies View Related

General :: Erasing From The Cursor Up To The Beginning Of The Following Word In Vim

Dec 13, 2010

In a wide family of "ancient" text editors, by pressing ^T you erased from the cursor up to the beginning of the following word. If we use '_' to represent the cursor, the thing was like this:

Code:

If I now hold <CNTL> down and press <T>, the result will be

Code:

Want to feel at home with vim. Many times I have consulted and even tried to systematically study vim's man page. Sometimes I consulted it with profit, sometimes not. This is one of the latter.

View 6 Replies View Related

General :: Erasing From The Cursor Up To The Beginning Of The Word In Vim?

Dec 13, 2010

In a wide family of "ancient" text editors, by pressing ^T you erased from the cursor up to the beginning of the following word. If we use '_' to represent the cursor, the thing was like this:

Code:
want to feel _ at home with vim. If I now hold <CNTL> down and press <T>, the result will be Code: want to feel at home with vim. Many times I have consulted and even tried to systematically study vim's man page. Sometimes I consulted it with profit, sometimes not. This is one of the latter.

View 3 Replies View Related

General :: Grep To Select Lines With M In Last Word

Mar 6, 2011

I have a large file in which each line has three or more blank-delimited words. I'd like to code a grep to keep only those lines which have the letter M in the last word. the M (if present) will be the first character in the last word.

View 14 Replies View Related

General :: Use Sed To Replace Number That Is In A String With Word?

Sep 12, 2010

I am trying to replace the first number in a string at the end of the line with the word that matches that number. for example i want to replace 546215 to be five-46215. The command that I have tried is

sed -r 's/5[0-9]{5}$/five-[0-9]{5}/'

View 3 Replies View Related

General :: Word Search In Files Using Bash?

Oct 9, 2010

I'm trying to use Bash to search some directories for a word in one of documents. I've tried:

Code:

$ grep -R Brzeninski /media/disk-1/Dual_Data/

but It never returned a prompt, and i'm not sure what grep means or does.

View 1 Replies View Related

General :: How To Go Back Or Forward A Word In Bash Environment

Mar 3, 2010

How can I move around the bash commandline efficiently?In the Windows prompt, one can go back or forward one word by pressing ctrl and <-/->.What's the equivalent in a bash environment?

View 1 Replies View Related

General :: Counting The Occurrence Of A Word In A Collection Of Files?

Jun 16, 2010

I am trying to find the word count of a specific word in a collection of documents, in Linux.

I have tried with grep and ack-grep in combination with wc but I can't seem to come up with a valid combination of pipes :)

View 1 Replies View Related







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