06-15-2010
Thanks bart.
Does anyone know how to do this using sed ? does any other shell in Unix recognize (\w+) as consecutive duplicate strings?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to write a script which prints out the users who are loged in.
Printing the output of the "users" command isn't the problem. What I want is to filter out my own username.
users | grep -v (username)
does not work because the whole line in which username exists is suppressed.
If... (5 Replies)
Discussion started by: Cozmic
5 Replies
2. Shell Programming and Scripting
Hi all,
I'm interested in printing out only the prefix of a formatted set of filenames. All files of this type have the same 8 character suffix. I'm using KSH.
Is there a command I could use to print the filenames, less the last 8 characters? Was thinking of using sed 's/<last 8 chars>//',... (1 Reply)
Discussion started by: rockysfr
1 Replies
3. Shell Programming and Scripting
hlow all i need help for my case
i want to get variable 20(in bold) but filter in print $3 not $2 so this input
95:20111005_20111123:1821546322
96:20111005_20111123:0053152068
97:20111005_20111123:1820960407
98:20111005_20111123:2021153102
99:20111005_20111123:2021153202... (4 Replies)
Discussion started by: zvtral
4 Replies
4. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
5. Shell Programming and Scripting
Hello to all in forum,
Maybe some unix expert could help me. I have the following tcpdump command:
tcpdump -i any port 13907 -s 0 -w Out.cap
I would like to run tcpdump to only capture data related with especific string.
Within the dump the protocol is GSM MAP and the string is Address... (0 Replies)
Discussion started by: cgkmal
0 Replies
6. Shell Programming and Scripting
KSH
HP-SOL-Lin
Cannot use xAWK
I have several strings that are quite long and i want to break them down into smaller substrings.
What I have
String = "word1 word2 word3 word4 .....wordx"
What I want
String1="word1 word2"
String2="word 3 word4"
String3="word4 word5"
Stringx="wordx... (5 Replies)
Discussion started by: nitrobass24
5 Replies
7. Shell Programming and Scripting
I have a string like
Months=jan feb mar april x y ..
Here the number of fields in Months is not definite
I need to extract each field in the Months string and pass it to awk . Don't want to use for in since it is a loop . How can i do it (2 Replies)
Discussion started by: Nevergivup
2 Replies
8. Shell Programming and Scripting
HI All,
We have an Redhat Machine,
And some folder with couple simple text files, this files containing a lot of lines with various strings and IP address with different classes.
The Requirement in eventually , is to pass the all various IP addresses to Excel.
My question is : what is... (4 Replies)
Discussion started by: James Stone
4 Replies
9. Shell Programming and Scripting
Hi Perl users,
I have another problem with text processing in Perl. I have a file below:
Linux Unix Linux Windows SUN
MACOS SUN SUN HP-AUX
I want the result below:
Unix Windows SUN
MACOS HP-AUX
so the duplicate string will be removed and also the keyword of the string on... (2 Replies)
Discussion started by: askari
2 Replies
10. Shell Programming and Scripting
Hi to you all,
I'm just struggling with a regex problem and I'm pretty sure that I'm missing sth obvious... :confused:
I need a regex to feed my grep in order to find lines that contain one string but not the other.
Here's the data example:
2015-04-08 19:04:55,926|xxxxxxxxxx| ... (11 Replies)
Discussion started by: stresing
11 Replies
LEARN ABOUT SUSE
exim_dbmbuild
EXIM_DBMBUILD(8) System Manager's Manual EXIM_DBMBUILD(8)
NAME
exim_dbmbuild - Build a DBM file.
SYNOPSIS
exim_dbmbuild [-nolc] [-nozero] [-noduperr] [-nowarn] inputfile|- outputfile
DESCRIPTION
The exim_dbmbuild program reads an input file containing keys and data in the format used by the lsearch lookup (see section 9.1). It
writes a DBM file using the lower-cased alias names as keys and the remainder of the information as data. The lower-casing can be pre-
vented by calling the program with the -nolc option.
A terminating zero is included as part of the key string. This is expected by the dbm lookup type. However, if the option -nozero is
given, exim_dbmbuild creates files without terminating zeroes in either the key strings or the data strings. The dbmnz lookup type can be
used with such files.
The program requires two arguments: the name of the input file (which can be a single hyphen to indicate the standard input), and the name
of the output file. It creates the output under a temporary name, and then renames it if all went well. If the native DB interface is in
use (USE_DB is set in a compile-time configuration file - this is common in free versions of Unix) the two file names must be different,
because in this mode the Berkeley DB functions create a single output file using exactly the name given. For example,
exim_dbmbuild /etc/aliases /etc/aliases.db
reads the system alias file and creates a DBM version of it in /etc/aliases.db.
In systems that use the ndbm routines (mostly proprietary versions of Unix), two files are used, with the suffixes .dir and .pag. In this
environment, the suffixes are added to the second argument of exim_dbmbuild, so it can be the same as the first. This is also the case
when the Berkeley functions are used in compatibility mode (though this is not recommended), because in that case it adds a .db suffix to
the file name.
If a duplicate key is encountered, the program outputs a warning, and when it finishes, its return code is 1 rather than zero, unless the
-noduperr option is used. By default, only the first of a set of duplicates is used - this makes it compatible with lsearch lookups.
There is an option -lastdup which causes it to use the data for the last duplicate instead. There is also an option -nowarn, which stops
it listing duplicate keys to "stderr". For other errors, where it doesn't actually make a new file, the return code is 2.
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 EXIM_DBMBUILD(8)