Are you looking for something like this:
Members may be able to help you better if you posted a part of the file you are working with and exactly what you are trying to do with the file.
Hi there
I have a file which has the lines
# Serial number for hostid
EXP_SERIAL_=""
These lines could be anywhere in the file as far as line numbers go, I would like replace these two lines with
# Serial number for hostid $var1
EXP_SERIAL_$var1="$var2"
Is there a quick and simple... (6 Replies)
Can any one give me the idea on replacing multiple blank lines with a single blank line?
Please conside it for a file having more than 100 number of characters.
Regards,
Siba (3 Replies)
Dear All,
Regards of the Day.
I have a text file with some functions:
Function1
{
parameter 1
parameter 2
parameter 3
}
end
Function2
{
parameter 1
parameter 2
parameter 3
} (1 Reply)
Hi All,
As mentioned in the title I have two text files and I would like to replace line number 5 of file #1 with line number 4 of file #2
e.g.
file 1
wqwert
4.4464002
3
319
286
369
46.320002
56.150002
45.100002
1
1
1
0.723 (12 Replies)
I have an xml file that is stripped down to output that looks bacically like;
<!-- TABLEA header -->
<tablea>
some fields
</tablea>
<!-- TABLEB header -->
<!-- TABLEC header -->
<tablec>
some fields
</tablec>
I want to remove the header... (3 Replies)
Hi
I have a file with below content :
a
b
S
I need to replace the lines which have a and b continuously by d.
d
S
I have used the below code
tr '\n' '#'<file|sed. 's/a#b/d/g's?|tr '#' '\n' where # is not occurring anywhere in the file..
Is there any other efficient way to do this?
... (7 Replies)
Hi
Am confused with the usage of "sed" command
I want to replace a single line with multiple lines of a file..
eg.,
A file has
Hi, How are you?
I need to replace as
Am fine
What are You doing?
I used the script as
string1="Hi, How are you?"
echo "$string1 is the value"... (4 Replies)
Dear Unix Forums,
I am hoping you can help me with a pattern matching problem.
What am I trying to do?
I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Here is the task that I was presented with:
I am dealing with about a 10,000 line input deck file for an analysis. About 10 separate blocks of around 25 lines of code each need to be updated in the input deck.
The input deck (deckToChange in the code below) comes with 2 separate files. File 1... (5 Replies)
Discussion started by: tiktak292
5 Replies
LEARN ABOUT OSF1
forward
forward(4) Kernel Interfaces Manual forward(4)NAME
forward - forward mail
SYNOPSIS
/var/adm/forward/username $HOME/.forward
DESCRIPTION
The .forward file allows a user to forward messages to another host, or to invoke programs (such as vacation(1)) to process their mail. It
is formatted as a series of comma-separated addresses in the form: addr_1, addr_2, ... Alternatively, each address can be on a separate
line.
The newer sendmail.v8 program also allows the use of comments (lines that begin with a ``#'') and blank lines.
As with the aliases(4) file, mail messages can be forwarded to another host or given to programs for further processing. The following is
an example of the vacation program. Assuming that the user's name is myra, create a .forward file and add the following line: myra,
"|/usr/bin/vacation myra"
The previous example forwards mail to myra (the backslash prevents an accidental aliasing loop), and also sends a copy of the message to
the vacation program.
For security reasons, the file must be owned by the user or by root and it should be writable only by the file owner. In addition, the
file must be readable by the owner (myra) or root.
On traditional systems, only the $HOME/.forward file is checked. The sendmail.v8 program allows the use of the system-wide forwarding
directory /var/adm/forward. By default, this directory is checked for a forward file prior to examining the users $HOME directory.
FILES
System-wide forwarding file. The per-user forwarding file.
RESTRICTIONS
The sendmail command can hang trying to read the user's $HOME/.forward file. If the user's home directory is NFS-mounted and temporarily
unavailable, sendmail will stall until the directory becomes available again. The use of non-NFS mounted directories for the forwarding of
files is recommended.
The use of /var/adm/forward is supported only by sendmail.v8.
The actual path for /var/adm/forward is configurable in the sendmail.cf file.
Incorrect file permissions/ownership are quietly ignored.
It is easy to create an accidental loop, for example, on host_a myra@host_b and on host_b myra@host_a
RELATED INFORMATION
Commands: aliases(4), sendmail.cf(4), sendmail(8) delim off
forward(4)