Hi,
I'm trying to use the sed command but I'm not sure how to use it properly. I've read the man pages for the sed command but I'm still unsure on how to use it.
Basically I have a file with the words male and female written multiple times. I want to swap the word male for female and... (4 Replies)
I have a group of xml files and I need to insert 3 parameters just after this line in each file:
---------------Pattern to be searched for-------------------------
<!--The following configuration is a test configuration-->
---------------Parameters to be added---------------------------... (11 Replies)
i have a file acc.sh which has about 10 lines and then i have defined $var which has a line number in it (say 5). i want to extarct from line 5 to the end of the file and put the output into another file. I have used
sed -n $var,'$p' acc.sh | tee abc.sh
but at times it does'nt work and gives an... (6 Replies)
Sed with sort doesnt work
The below code doesnt work:
sed -e '/^$/d' -e 's/,/|/g' | sort -t"|" -k1,1 -u file1
when i seperate them it work but i have to create intermediate file which i dont want to:
sed -e '/^$/d' -e 's/,/|/g' file1 > file2
sort -t"|" -k1,1 -u file2
Help... (2 Replies)
Hi,everyone:
I'm new to shell, and now get trouble with some script:
line=`/usr/xpg4/bin/awk '/^(*\|){2}'"$CR"'/ {print $0}' ${TIER4FILE}|grep -v
OSNAME=`sed -n ''$LINE'p' $DATALOC/os`
sort +1 /tmp/LhasaCRs2 > /tmp/LhasaCRs1
I cannot understand the "{2}" here. My mentor said it... (1 Reply)
$ echo "a,0,0,0,b,0" | sed 's/,0,/,1,/g'
gives output as
$ a,1,0,1,b,0
rather than as
a,1,1,1,b,0
how can i solve this problem
Thanks a lot in advance....
Use code tags. (4 Replies)
I want to print out the lines that have the max value in column 3. and count the occurrence of column 1; if there are more than one occurrences, line with highest column 2 value will be printed.
I have this data:
input:
AV 234 25
AV 256 76
AS 421 34
AV 124 76
BD 136 71
BD 241 76
AW... (10 Replies)
Hi,
i "tried" to sort data by date. So far, i used sed to take the data from the last and the actual month. Now, after changing the year it is not working properly.
i use:
GNU bash, version 4.2.45(1)-release (x86_64-suse-linux-gnu)
sed -n '/\//p' $Home/../scripte/pd_0.txt
y is a... (6 Replies)
Hello,
I have spent a couple of hours trying to answer this myself, so forgive me if the answer is simple but I have tried.
I have a text file generated from svn log output which contains a list of files.
Two regexps im using are
*
and
*
They both work but some lines has a mixture... (7 Replies)
Discussion started by: YogaBija
7 Replies
LEARN ABOUT REDHAT
exinext
EXINEXT(8) System Manager's Manual EXINEXT(8)NAME
exinext - Finding individual retry times
SYNOPSIS
exinext address|message-id
DESCRIPTION
A utility called exinext (mostly a Perl script) provides the ability to fish specific information out of the retry database. Given a mail
domain (or a complete address), it looks up the hosts for that domain, and outputs any retry information for the hosts or for the domain.
At present, the retry information is obtained by running exim_dumpdb (see below) and processing the output. For example:
exinext piglet@milne.fict.example
kanga.milne.fict.example:192.168.8.1 error 146: Connection refused
first failed: 21-Feb-1996 14:57:34
last tried: 21-Feb-1996 14:57:34
next try at: 21-Feb-1996 15:02:34
roo.milne.fict.example:192.168.8.3 error 146: Connection refused
first failed: 20-Jan-1996 13:12:08
last tried: 21-Feb-1996 11:42:03
next try at: 21-Feb-1996 19:42:03
past final cutoff time
You can also give exinext a local part, without a domain, and it will give any retry information for that local part in your default
domain. A message id can be used to obtain retry information pertaining to a specific message. This exists only when an attempt to
deliver a message to a remote host suffers a message-specific error (see section 42.2). exinext is not particularly efficient, but then it
isn't expected to be run very often.
BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches
would be greatly appreciated.
SEE ALSO exim(8), /usr/share/doc/exim4-base/
AUTHOR
This manual page was stitched together from spec.txt by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux system
(but may be used by others).
March 26, 2003 EXINEXT(8)