Sponsored Content
Top Forums Shell Programming and Scripting replace words in file based on another file Post 302187960 by quine on Tuesday 22nd of April 2008 10:55:52 AM
Old 04-22-2008
In what language/utility? I can do in PERL. Takes only a few lines, but to get it right (and elegant) I might have to tinker for a while....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to replace a word with a series of words in a file

Hi, I have a Template file 'TL.body' which says as follows: "There are no <FILENAME> files on the server. " The missing file names are identified and stored in a variable. For Eg: MISSFILE="abc.txt def.txt xyz.txt" I want the values of MISSFILE variable to be replaced against... (2 Replies)
Discussion started by: brap45
2 Replies

2. UNIX for Dummies Questions & Answers

sed replace words in file and keep some

lets see if i can explain this in a good way. im trying to replace some words in a file but i need to know what the words are that is beeing replaced. not sure if sed can do this. file.name.something.1DATA01.something.whatever sed "s/./.DATA?????/g" need to know what the first . is... (2 Replies)
Discussion started by: cas
2 Replies

3. UNIX for Dummies Questions & Answers

To Extract words from File based on Position

Hi Guys, While I was writing one shell script , I just got struck at this point. I need to extract words from a file at some specified position and do some comparison operation and need to replace the extracted word with another word. Eg : I like Orange very much. I need to replace... (19 Replies)
Discussion started by: kuttu123
19 Replies

4. Shell Programming and Scripting

Splitting Concatenated Words in Input File with Words from a Master File

Hello, I have a complex problem. I have a file in which words have been joined together: Theboy ranslowly I want to be able to correctly split the words using a lookup file in which all the words occur: the boy ran slowly slow put child ly The lookup file which is meant for look up... (21 Replies)
Discussion started by: gimley
21 Replies

5. Shell Programming and Scripting

How to replace character in a file based on another file.?

Hi Gurus, I have really hard job need you guys to help. i have two files one is data file, one is instruction file like below 0000000010000233154825032720204abc BC15 0000000010000233154825032720204defg DB15 1 9 o 10 6 r 16 5 o 21 10 r 31 the requirement is based... (5 Replies)
Discussion started by: ken6503
5 Replies

6. UNIX for Dummies Questions & Answers

Replace the words in the file to the words that user type?

Hello, I would like to change my setting in a file to the setting that user input. For example, by default it is ONBOOT=ON When user key in "YES", it would be ONBOOT=YES -------------- This code only adds in the entire user input, but didn't replace it. How do i go about... (5 Replies)
Discussion started by: malfolozy
5 Replies

7. Shell Programming and Scripting

How to replace words in file?

Hi Guys, I have a text where we used Ram in 10 times now I want replace all Ram words by Shyam word then how to do it. (6 Replies)
Discussion started by: aaditya321
6 Replies

8. Shell Programming and Scripting

How to replace some specific words from file?

I have the file like this. cat 123.txt <p> <table border='1' width='90%' align='center' summary='Script output'> <tr><td>text </td> </tr> </table> </p> I want to replace some tags and want the output like below. I tried with awk & sed commands. But no luck. Could someone help me on this? ... (4 Replies)
Discussion started by: thomasraj87
4 Replies

9. Shell Programming and Scripting

Replace particular words in file based on if finds another words in that line

Hi All, I need one help to replace particular words in file based on if finds another words in that file . i.e. my self is peter@king. i am staying at north sydney. we all are peter@king. How to replace peter to sham if it finds @king in any line of that file. Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies

10. UNIX for Beginners Questions & Answers

How to replace matching words defined in one file on another file?

I have file1 and file2 as shown below, file1: ((org14/1-131541:0.11535,((org29/1-131541:0.00055,org7/1-131541:0.00055)1.000:0.10112,((org17/1-131541:0.07344,(org23/1-131541:0.07426,((org10/1-131541:0.00201,org22/1-131541:0.00243)1.000:0.02451, file2: org14=india org29=america... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies
VGRIND(1)						    BSD General Commands Manual 						 VGRIND(1)

NAME
vgrind -- grind nice listings of programs SYNOPSIS
vgrind [-] [-W] [-d file] [-f] [-h header] [-llanguage] [-n] [-p postproc] [-s pointsize] [-t] [-x] name ... DESCRIPTION
The vgrind utility formats the program sources specified as arguments on the command line in a nice style using troff(1). Comments are placed in italics, keywords in bold face, and the name of the current function is listed down the margin of each page as it is encountered. The vgrind utility runs in two basic modes, filter mode (see the -f option) or regular mode. In filter mode vgrind acts as a filter in a manner similar to tbl(1). The standard input is passed directly to the standard output except for lines bracketed by the troff-like macros: .vS starts processing .vE ends processing These lines are formatted as described above. The output from this filter can be passed to troff(1) for output. There need be no particular ordering with eqn(1) or tbl(1). In regular mode vgrind accepts input files, processes them, and passes them to the postprocessor for output, psroff(1) by default. In both modes vgrind passes any lines beginning with a decimal point without conversion. The options are: - forces input to be taken from standard input (default if -f is specified) -W forces output to the (wide) Versatec printer rather than the (narrow) Varian -d file specifies an alternate language definitions file (default is /usr/share/misc/vgrindefs) -f forces filter mode -h header specifies a particular header to put on every output page (default is the file name) -l specifies the language to use. Currently known are PASCAL (-lp), MODEL (-lm), C (-lc or the default), C++ (-lc++), CSH (-lcsh), SHELL (-lsh), RATFOR (-lr), MODULA2 (-lmod2), YACC (-lyacc), LISP (-lisp), ICON (-lI), and PERL (-lperl). -n forces no keyword bolding -p postproc use postproc to post-process the output, psroff(1) by default. -s pointsize specifies a point size to use on output (exactly the same as the argument of a .ps) -t similar to the same option in troff(1) causing formatted text to go to the standard output -x outputs the index file in a ``pretty'' format. The index file itself is produced whenever vgrind is run with a file called index in the current directory. The index of function definitions can then be run off by giving vgrind the -x option and the file index as argument. FILES
index file where source for index is created /usr/share/tmac/tmac.vgrind macro package /usr/libexec/vfontedpr preprocessor /usr/share/misc/vgrindefs language descriptions SEE ALSO
getcap(3), vgrindefs(5) HISTORY
The vgrind command appeared in 3.0BSD. BUGS
The vfontedpr preprocessor assumes that a certain programming style is followed: For C - function names can be preceded on a line only by spaces, tabs, or an asterisk. The parenthesized arguments must also be on the same line. For PASCAL - function names need to appear on the same line as the keywords function or procedure. For MODEL - function names need to appear on the same line as the keywords is beginproc. If these conventions are not followed, the indexing and marginal function name comment mechanisms will fail. More generally, arbitrary formatting styles for programs mostly look bad. The use of spaces to align source code fails miserably; if you plan to vgrind your program you should use tabs. This is somewhat inevitable since the font used by vgrind is variable width. The mechanism of ctags(1) in recognizing functions should be used here. Filter mode does not work in documents using the -me or -ms macros. (So what use is it anyway?) BSD
August 29, 2006 BSD
All times are GMT -4. The time now is 11:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy