06-07-2012
Thats worked for me. Thank you very much.
Is it possible to accomplish with sed commands. This is just to know how to do if it is possible to do with sed.
Regards,
Pointers
---------- Post updated at 07:15 AM ---------- Previous update was at 07:00 AM ----------
How to replace the words matching using the above commands in all the files in a directory.
Thank you very much in advance.
Regards,
Pointers
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have a file and in that, I want to search for a aprticular word and then replace another word in the same line with something else.
Example: In file abc.txt, there is a line
<host oa_var="s_hostname">test</host>
I want to search with s_hostname text and then replace test with... (2 Replies)
Discussion started by: sshah1001
2 Replies
2. Shell Programming and Scripting
Hi folks,
have a look into the attachment, i am not familiar with unix, can you please help me in this regard.
thanks in advance, :)
regards,
Geeko (4 Replies)
Discussion started by: geeko
4 Replies
3. Shell Programming and Scripting
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
Discussion started by: cbo0485
1 Replies
4. Shell Programming and Scripting
Hi there.!
I'm trying to make a script that corrects wrong spelling. I want to use sed to replace wrong word with the correct one, but this must be made in a while loop that reads the wrong word from file (with read line) and the correct one from another file. I can't find a way to run sed like... (3 Replies)
Discussion started by: spiii
3 Replies
5. Shell Programming and Scripting
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
Discussion started by: piynik
5 Replies
6. Shell Programming and Scripting
Hi,
I have the following line in file1
export NAME="NEW_NAME"
I'm writing a shell script which reads the NEW_NAME from the user and replace in the file. I have used the following command for that
read Name_replace
sed -i 's/NEW_NAME/$Name_replace/' file1
but it is not... (2 Replies)
Discussion started by: Ananthdoss
2 Replies
7. Shell Programming and Scripting
Hi Gurus,
I did an exhaustive search for finding the script using "sed" to exclude the first line of file during find and replace.
The first line in my file is the header names.
Thanks for your help.. (4 Replies)
Discussion started by: ks_reddy
4 Replies
8. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
9. Shell Programming and Scripting
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
10. Shell Programming and Scripting
hello Team,
I am looking for sed command or script which will append word at end of line. for example. I want to validate particular filesystem with mount |<filesystem name> command. if nodev parameter is not there then it should add in the fstab file with receptive to the filesystem.
# mount... (8 Replies)
Discussion started by: ghpradeep
8 Replies
LEARN ABOUT DEBIAN
docdiff
DOCDIFF(1) General Commands Manual DOCDIFF(1)
NAME
docdiff -- character/word-oriented diff
SYNOPSIS
docdiff [options] file1 file2
DESCRIPTION
This manual page documents briefly the docdiff commands.
This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has docu-
mentation in the HTML format; see below.
docdiff is a program that compares two files and shows the difference. It can compare files word by word, char by char, or line by line.
It has several output formats such as HTML/XHTML, tty, Manued, or user-defined markup.
It supports several encodings and end-of-line characters, including ASCII, UTF-8, EUC-JP, Shift_JIS, CR, LF, and CRLF.
OPTIONS
--resolution=RESOLUTION
specify resolution (granularity) line|word|char (default is word)
--line set resolution to line
--word set resolution to word
--char set resolution to char
--encoding=ENCODING
specify character encoding ASCII|EUC-JP|Shift_JIS|UTF-8|auto (default is auto)
--ascii same as --encoding=ASCII
--eucjp same as --encoding=EUC-JP
--sjis same as --encoding=Shift_JIS
--utf8 same as --encoding=UTF-8
--eol=EOL specify end-of-line character CR|LF|CRLF|auto (default is auto)
--cr same as --eol=CR
--lf same as --eol=LF
--crlf same as --eol=CRLF
--format=FORMAT
specify output format tty|manued|html|wdiff|user (default is html; user tags have to be described in config file)
--tty same as --format=tty
--manued same as --format=manued
--html same as --format=html
--wdiff same as --format=wdiff
--digest digest output, do not show all
--cache use file cache
--no-config-file
do not read config files
--verbose run verbosely
--help show usage
--version show version
--license show license
--author show author(s)
SEE ALSO
/usr/share/doc/docdiff/readme.html.
AUTHOR
This manual page was written by akira yamada akira@debian.org for the Debian system (but may be used by others).
DOCDIFF(1)