Sponsored Content
Top Forums Shell Programming and Scripting error while replacing a string by new line character in sed Post 302311136 by millan on Tuesday 28th of April 2009 02:51:22 AM
Old 04-28-2009
Hi Panyam,

Thanks for ur reply.
Can u please give some idea about deroff command.
i have seen its man page but cannt understand .

Please help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing string with special character ???

the problem is while replacing the old string with new one with the help of SED i am unable to replace the special characters with new strings. how can i do that? i dont want the user to be given the trouble to write '\' before every special characters like * , . , \ , $ , &. sed... (4 Replies)
Discussion started by: imppayel
4 Replies

2. UNIX for Dummies Questions & Answers

Replacing a character in a line

Hi All I want to replace a character in a line, but position will be different form one iteration to another. So i m keeping the position i a variable. I am trying with following code pos=3 echo "Hello World, Good Morning" | sed 's/\(.\{$pos\}\)./\1Y/' But its not working, Can you... (2 Replies)
Discussion started by: Usha Shastri
2 Replies

3. Shell Programming and Scripting

Replacing a character string in a file

Hi there, I have a paramater file that looks like this :- IRL|07122005|27389|VTIEpay|email address|5|200 When my program finishes I want to replace the seventh field. the existing code is like this cat <<-EOF | ed -s $PARFILE 1,$ g/^$ICO/s/$prvdate/$TODAY/ 1,$... (13 Replies)
Discussion started by: rjsha1
13 Replies

4. Shell Programming and Scripting

Replacing the last character for each line in a file

Hello, I have a csv file and will like to replace the last character of each line in the file with Z (20 Replies)
Discussion started by: 123script
20 Replies

5. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

6. Shell Programming and Scripting

sed inside sed for replacing string

My need is : Want to change docBase="/something/something/something" to docBase="/only/this/path/for/all/files" I have some (about 250 files)xml files. In FileOne it contains <Context path="/PPP" displayName="PPP" docBase="/home/me/documents" reloadable="true" crossContext="true">... (1 Reply)
Discussion started by: linuxadmin
1 Replies

7. Shell Programming and Scripting

Sed: delete on each line before a character and after a character

Hi there, A total sed noob here. Is there a way using sed to delete everything before a character AND after another character on each line in a file? The deletion should also delete the indicating characters(here: an opening and a closing parenthesis). The original file would look like... (3 Replies)
Discussion started by: bnbsd
3 Replies

8. UNIX for Dummies Questions & Answers

Replacing special character with sed

Hi All, I have a text file that contains I1SP2 *=*=Y=M=D001D My requirement is to replace all occurrence of =* to =Z expected o/p is I1SP2 *=Z=Y=M=D001D I have tried with sed 's/=*/=Z/g' file sed 's!\=*!\=Z/g' file sed 's!\=*!\=Z!g' file sed 's!\=\*!\=Z!g' file but its not... (3 Replies)
Discussion started by: gotamp
3 Replies

9. Shell Programming and Scripting

sed searches a character string for a specified delimiter character, and returns a leading or traili

Hi, Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank. Text file : "1"|"ExternalClassDEA519CF5"|"Art1" "2"|"ExternalClass563EA516C"|"Art3" "3"|"ExternalClass305ED16B8"|"Art9" ... ... ... (2 Replies)
Discussion started by: fspalero
2 Replies

10. Shell Programming and Scripting

awk sed to repeat every character on same position from the upper line replacing whitespace

Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position? I am asking this because the file I have doesn't always follow a pattern. For example the file I have is the result of a command to obtain windows ACLs: icacls C:\ /t... (5 Replies)
Discussion started by: nakaedu
5 Replies
deroff(1)						      General Commands Manual							 deroff(1)

NAME
deroff - Deletes neqn, nroff, and tbl constructs SYNOPSIS
deroff [-i | -l] [-kpuw] [-ma | -me | -mm | -ms] file... deroff [-i | -l] [-kpuw] -mm -ml file... The deroff command reads the specified files (or standard input by default), removes all nroff requests, macro calls, backslash constructs, eqn constructs (between and lines and between delimiters), and tbl descriptions, replacing many of them with spaces or blank lines, and writes the remainder of the file to standard output. OPTIONS
Suppresses processing of included files (.so and Keeps blocks of text specified by requests or macros; for example, the request. Sup- presses processing of included files whose names begin with /usr/lib (such as macro files in /usr/lib/tmac). Interprets man macros only. Interprets me macros only. Ignores mm macros and deletes mm list structures. The -mm option must be specified with this option. Inter- prets ms and mm macros only. Interprets ms macros only. Performs special paragraph processing. Removes _ and  in underlined and boldfaced words. Automatically sets the -w option. Formats output into a word list, containing one word per line, with all other charac- ters deleted. In text, a word is any string that contains at least two letters and is composed of letters, digits, ampersands (&), and apostrophes ('). In a macro call, a word is a string that begins with at least two letters and contains a total of at least three letters. Delimiters are any characters other than letters, digits, ampersands, and apostrophes. Trailing ampersands and apostrophes are removed from words. DESCRIPTION
The deroff command normally follows chains of included files (.so and requests) and processes those files. If a file was already included, a naming it is ignored and a deroff(1)
All times are GMT -4. The time now is 10:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy