02-14-2011
Thanks a lot to you!
That code did it!
with kindest regards
From
Stefan M. Dohn
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
2. Shell Programming and Scripting
Hi
I need a perl onliner which seaches a line starting with a pattern(last occurence) and display it.
similar to
grep 'pattern' filename | tail -1 in UNIX
Ex: I want to display the line starting with "cool" and which is a last occurence
adadfadafadf
adfadadf
cool dfadfadfadfara... (4 Replies)
Discussion started by: ammu
4 Replies
3. Shell Programming and Scripting
Hi,
I am trying to grep for two patterns from a set of 820 apache webserver logs,
When I Try to search the pattern with a date stamp and use a wildcard character * for ex: /28/Aug/2008:21*/ to get all the log entries for that particular hour that is 21 st hour I get errors. Please kindly... (1 Reply)
Discussion started by: openspark
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am new to this forum and i would like to get help in this issue.
I have a file 1.txt as shown:
apple
banana
orange
apple
grapes
banana
orange
grapes
orange
....
Now i would like to search for pattern say apple or orange and then put a # at the beginning of the pattern... (2 Replies)
Discussion started by: imas
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I think you ppl did not get my question correctly, let me explain
I have 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
... (1 Reply)
Discussion started by: imas
1 Replies
6. Shell Programming and Scripting
Hi
i want to search two pattern on same line and replace onther pattern..
INPut file
aaaa bbbbb nnnnnn ttttt
cccc bbbbb nnnnnn ppppp
dddd ccccc nnnnnn ttttt
ffff bbbbb oooooo ttttt
now i want replace this matrix like.. i want search for "bbbbb","nnnnnn" and search and replace for... (4 Replies)
Discussion started by: nitindreamz
4 Replies
7. Shell Programming and Scripting
can someone help me out with the bolded?
else if (regmatch($Subject, "^Application") && (regmatch($From, "^etgh") && (regmatch($Body, ".*not authorized to use this server.*"))))
what this section of the code is suppose to do is to scan through the contents of $Body, if do a set of... (1 Reply)
Discussion started by: SkySmart
1 Replies
8. Shell Programming and Scripting
Dear All,
i want to search particular string and want to replance next line value.
following is the test file.
search string is
tmp,???
,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50
tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies
9. Shell Programming and Scripting
Hi All,
I am new to shell scripting and need help in scripting using CSH.
Here is what I am trying to so,
1. Search a specific string e.g. "task" from "task (input1, out1)".
2. Extract the arguements "input1" and "out1"
3. Add them in separate lines below. eg. "int input1" , " integer out1"
... (7 Replies)
Discussion started by: deshiashish
7 Replies
10. Shell Programming and Scripting
Hi,
I want to search a pattern in a text file and remove another pattern in that file.
my text file look like this
0.000000 1.970000 F 303 -
1.970000 2.080000 VH VH +
2.080000 2.250000 VH VH +
2.250000 2.330000 VH L -
2.330000 2.360000 F H +
2.360000 2.410000 L VL -
2.410000 ... (6 Replies)
Discussion started by: sreejithalokkan
6 Replies
LEARN ABOUT DEBIAN
debaux-build
DEBAUX-BUILD(1p) User Contributed Perl Documentation DEBAUX-BUILD(1p)
NAME
debaux-build - Debian package building script
SYNOPSIS
debaux-build [OPTIONS] DEBDIR [BUILDDIR SOURCEDIR]
debaux-build --cpan Net::Google
VERSION
0.1.10
DESCRIPTION
debaux-build is a helper script for building Debian packages. Besides options it takes up to three parameters: DEBDIR, BUILDDIR,
SOURCEDIR. DEBDIR is a required parameter.
If DEBDIR doesn't exist, debaux-build tries to download the package with apt-get source.
debaux-build applies all patches found in the DEBDIR subdirectory patches.
If no source tarball exist and the DEBDIR subdirectory sources exist, all files in this directory get packed and used as source tarball.
OPTIONS
"--apt"
Forces apt-get source mode.
"--archive"
Specifies file name of source archive.
"--build-options"
Options passed to "dpkg-buildpackage".
"--cpan"
Download Perl module from CPAN and create necessary Debian packaging files. You need to have the dh-make Debian package installed in
order to utilize this option.
"--empty"
Empty package (no source code archive). Intended to use for task packages.
"--epoch"
Specifies epoch for CPAN builds.
"--extra-sources"
Specifies a directory below DEBDIR which is copied to the build directory.
"-i, --install, --install=PACKAGE"
Install build package.
"-l, --lintian"
Run lintian on the source file and the generated packages.
"--make-archive"
Intended to use for native Debian packages. Specify the commands to build the archive here.
"--release"
The generated packages are targeted for official Debian packages.
"--rpm, --alien"
Convert generated packages into RPM packages by using "alien".
"-s, --sign"
Sign source package and changelog.
"--skip-patches"
Don't apply patches from the patches directory and sources.diff file.
"--source-tree"
Instructs "debaux-build" to use the specified directory instead of an archive file.
"--stop-before-build"
Stop script before calling "dpkg-buildpackage".
CONFIGURATION FILE
"debaux-build" looks for the configuration file ".debauxrc" in the home directory and in the current directory and recognizes the following
directives:
"debauxdir" PACKAGE
Used as "DEBDIR" for package if it is an existing directory. Considered before the <debiandir> directive.
"debiandir"
If the directory "DEBDIR" on the commandline doesn't exist, "debaux-build" appends "DEBDIR" to the specified directory and tries again.
"sourcedir"
Directory with the source archives. Can be overridden by the commandline parameter "SOURCEDIR".
"source-tree" PACKAGE
Directory with the source code for PACKAGE.
SEE ALSO
dpkg(8), dpkg-source(1), apt-get(8)
AUTHOR
Stefan Hornburg (Racke) <racke@linuxia.de>.
LICENSE
debaux-build comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute and modify it under the terms of
the GNU General Public License.
COPYRIGHT
Copyright 2000,2001,2002,2003,2004,2005,2006,2007 Stefan Hornburg (Racke) <racke@linuxia.de>.
perl v5.8.8 2007-07-15 DEBAUX-BUILD(1p)