I have two files. File 'a' has contents:
1|1
2|2
3|3
4|4
and file 'b' has contents:
abc|def
hij|klm
nop|qrs
tuv|wxy
I would like to prepend file 'a' to file 'b' (with pipe) such that the contents of 'b' will be:
1|1|abc|def
2|2|hij|klm
3|3|nop|qrs
4|4|tuv|wxy (3 Replies)
Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
I want to print out a directory listing, then append ] to the end of each line. I'm trying to create a list of Wiki links based on folder listings that i can just copy and paste without having to edit 100's of file listings.
Using sed i've figured out to do something like this:
sed... (4 Replies)
Hi,
I am trying to add a blank line between sets of replicate values. I have been trying to use
uniq -D -f4 input.txt > output.txt
The input is like
V2-1.0 -1.0 5500.00 4162.00 529976.06030125.0 1997A
V2-1.0 -1.0 6000.00 4285.00 ... (6 Replies)
Hello everyone, I've suddenly gotten very interested in sed and awk (and enjoying it quite a bit too) because of a large conversion project that we're working on. I'm currently stuck with a very inefficient process for processing text blocks. I'm sure someone here should be able to easily point out... (2 Replies)
hi all ,
i had the below sed command to append header at the starting of my output file ....
sed -i -e '1i saikumar suresh hemanth' output.txt
i want to append spaces to the Name saikumar how can i append with in this command ....? (1 Reply)
Prepending lines with: your, the, a or an based on 1st letter match. You'll see my problem below:
sed '/^p\|^f\|^c\|^d\|^l/ s/^/your /' list.txt > your.txt && sed '/^v\|^j\|^k\|^m\|^n\|^s/ s/^/the /' your.txt > the.txt && sed '/^b\|^g\|^h\|^q\|^r\|^t\|^w\|^z/ s/^/a /' the.txt > a.txt && sed... (10 Replies)
Looking to add text to a file, example
File example;
nodegroups:
check-hosts: L@host.domain.com,host2.domain.com,host3.domain.com
I need to take a file with a one line list of hosts separated by commas
host.domain.com,host2.domain.com,host3.domain.comand prepend the string " ... (6 Replies)
Hi All,
I have a file like below. In the field 9 I am having 14,014,3,001/009 on the records. I want to convert the field to a three digit value. For example 14 should 014 , 3 should 003
11050;11001;;CREDITTRANC;5293218;NRATL;;;11095;;-1;14;3;29=0000;1.25... (5 Replies)
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
LEARN ABOUT DEBIAN
cufilter
CUFILTER(1p) User Contributed Perl Documentation CUFILTER(1p)NAME
cufilter - Filter emails through Mail::CheckUser
SYNOPSIS
Add the following lines to your ~/.procmailrc:
# Filter mail through Mail::CheckUser
:0f
| /usr/bin/cufilter
DESCRIPTION
When email messages are filtered through this program using the procmail settings as outlined in the SYNOPSYS, the email address in the
"From:" header is passed through Mail::CheckUser to ensure validity. If there is a problem with the email address, the "Subject:" header
is modified to show which email address failed along with the failure reason. No messages are lost, but it provides an easy way for the
mail client to organize, sort, or filter based on the subject tweaks.
EXAMPLES
Lets say a spammer sends a message with the following headers:
From: god@heaven.org
To: you@host.com
Subject: Happy Pill
Then the new headers might change to the following:
From: god@heaven.org
To: you@host.com
Subject: [CU!god@heaven.org!DNS failure: SERVFAIL] Happy Pill
This makes it easy to filter for mail clients.
INSTALL
This file can be installed into /usr/bin/cufilter and is intended to be utilized through the procmail functionality by adding the following
lines to your ~/.procmailrc configuration.
# Filter mail through Mail::CheckUser
:0f
| /usr/bin/cufilter
AUTHORS
Rob Brown bbb@cpan.org
COPYRIGHT
Copyright (c) 2003 Rob Brown bbb@cpan.org. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
$Id: cufilter,v 1.3 2003/09/18 15:36:26 hookbot Exp $
SEE ALSO Mail::CheckUser(3), procmail(1).
perl v5.14.2 2012-03-10 CUFILTER(1p)