09-26-2007
Wonderful. You are my idol. radoulov
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ok, lets suppose I have two files like so:
file1
John 5441223
Sandy 113446
Jill 489799
file2
Sandy Tuesday
Jill Friday
John Monday
Is it possible to match records from these two files and output them into one output file? For example, lets suppose I want to output like this:
... (5 Replies)
Discussion started by: Liguidsoul
5 Replies
2. Shell Programming and Scripting
Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in
1) starting with "20071126 11:11:11 Machine Header 1"
1000 lines...
"End machine header 1"
2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies
3. Shell Programming and Scripting
OS : Linux 2.6.9-67 - Red Hat Enterprise Linux ES release 4
Looking for a script that reads the following log files that gets generated everynight between 2 - 5am
Master_App_20090717.log
Master_App1_20090717.log
Master_App2_20090717.log
Master_App3_20090717.log... (2 Replies)
Discussion started by: aavam
2 Replies
4. Shell Programming and Scripting
Hello
Can someone help me to write a perl script or kornshell reading a two files and outputting to comma format.
Here is the two files
listofdisks.txt
id, diskname, diskgroup, diskisze(GB), FC
1, CN34, GRP1, 30, FC_CN34
2, CN67, GRP5, 19,
4, VD1, GRP4, 23, FC_VD1
6, CF_D1, ... (0 Replies)
Discussion started by: deiow
0 Replies
5. UNIX for Dummies Questions & Answers
Solaris 10/Korn
Hi unix experts!,
Is it possible to output the actual file names to a file as they are being deleted via the rm command?
Context:
Im executing the shell script at the command line and directing the output to an output file eg purgescript.ksh > output.lst
within the... (3 Replies)
Discussion started by: satnamx
3 Replies
6. Shell Programming and Scripting
Hi,
I have a shell script
#!/bin/sh
date
echo 'HI PROD'
echo $Please ENTER THE INPUT 1 for old files 2 for new file
read i
if ;
then
cd /apps/acetp3_logs/prod3/O*
pwd
echo $PLEASE ENTER THE STRING TO SEARCH (PLEASE ENTER THE STRING INSIDE QUOTES ' ')
read j
echo... (6 Replies)
Discussion started by: thelakbe
6 Replies
7. UNIX for Dummies Questions & Answers
I have many files that can have various amounts of rows. I essentially want to output each row into a new file if a pattern is matched between two files.
I have some code that does something similar but I want it to output every single input row from every file into a separate output file; that... (5 Replies)
Discussion started by: verse123
5 Replies
8. UNIX for Beginners Questions & Answers
I have two files:
File_1:
@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCAGAAGCAGCAT
+
GGGGGGGGGGGGGGGGGCCGGGGGF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8F
... (3 Replies)
Discussion started by: Xterra
3 Replies
9. Shell Programming and Scripting
Good Morning,
Every so often, I have copy scripts that to don't complete, but I don't immediately know why. It usually ends up being a permissions issue or a length issue.
The scripts edit a log file, so I'd like to include any copy errors/issues in that file to check if the copies... (4 Replies)
Discussion started by: Stellaman1977
4 Replies
10. Shell Programming and Scripting
I have a log file that looks like this. the lines are grouped. 2 lines per entry.
M: 2019-01-25 13:02:31.698 P25, received network transmission from KI4EKI to TG 10282
M: 2019-01-25 13:02:35.694 P25, network end of transmission, 4.3 seconds, 1% packet loss
M: 2019-01-25 13:02:38.893 P25,... (7 Replies)
Discussion started by: ae4ml
7 Replies
LEARN ABOUT MOJAVE
perl6::junction5.18
Perl6::Junction(3) User Contributed Perl Documentation Perl6::Junction(3)
NAME
Perl6::Junction - Perl6 style Junction operators in Perl5.
SYNOPSIS
use Perl6::Junction qw/ all any none one /;
if (any(@grant) eq 'su') {
...
}
if (all($foo, $bar) >= 10) {
...
}
if (qr/^d+$/ == all(@answers)) {
...
}
if (all(@input) <= @limits) {
...
}
if (none(@pass) eq 'password') {
...
}
if (one(@answer) == 42) {
...
}
DESCRIPTION
This is a lightweight module which provides 'Junction' operators, the most commonly used being "any" and "all".
Inspired by the Perl6 design docs, <http://dev.perl.org/perl6/doc/design/exe/E06.html>.
Provides a limited subset of the functionality of Quantum::Superpositions, see "SEE ALSO" for comment.
Notice in the "SYNOPSIS" above, that if you want to match against a regular expression, you must use "==" or "!=". Not "=~" or "!~". You
must also use a regex object, such as "qr/d/", not a plain regex such as "/d/".
SUBROUTINES
all()
Returns an object which overloads the following operators:
'<', '<=', '>', '>=', '==', '!=',
'lt', 'le', 'gt', 'ge', 'eq', 'ne',
Returns true only if all arguments test true according to the operator used.
any()
Returns an object which overloads the following operators:
'<', '<=', '>', '>=', '==', '!=',
'lt', 'le', 'gt', 'ge', 'eq', 'ne',
Returns true if any argument tests true according to the operator used.
none()
Returns an object which overloads the following operators:
'<', '<=', '>', '>=', '==', '!=',
'lt', 'le', 'gt', 'ge', 'eq', 'ne',
Returns true only if no argument tests true according to the operator used.
one()
Returns an object which overloads the following operators:
'<', '<=', '>', '>=', '==', '!=',
'lt', 'le', 'gt', 'ge', 'eq', 'ne',
Returns true only if one and only one argument tests true according to the operator used.
ALTERING JUNCTIONS
You cannot alter junctions. Instead, you can create new junctions out of old junctions. You can do this by calling the "values" method on
a junction.
my $numbers = any(qw/1 2 3 4 5/);
print $numbers == 3 ? 'Yes' : 'No'; # Yes
$numbers = any( grep { $_ != 3 } $numbers->values );
print $numbers == 3 ? 'Yes' : 'No'; # No
EXPORT
'all', 'any', 'none', 'one', as requested.
All subroutines can be called by its fully qualified name, if you don't want to export them.
use Perl6::Junction;
if (Perl6::Junction::any( @questions )) {
...
}
WARNING
When comparing against a regular expression, you must remember to use a regular expression object: "qr/d/" Not "/d/". You must also use
either "==" or "!=". This is because "=~" and "!~" cannot be overriden.
TO DO
Add overloading for arithmetic operators, such that this works:
$result = any(2,3,4) * 2;
if ($result == 8) {...}
SUPPORT
/ BUGS
Submit to the CPAN bugtracker <http://rt.cpan.org>
SEE ALSO
Quantum::Superpositions provides the same functionality as this, and more. However, this module provides this limited functionality at a
much greater runtime speed, with my benchmarks showing between 500% and 6000% improvment.
<http://dev.perl.org/perl6/doc/design/exe/E06.html> - "The Wonderful World of Junctions".
AUTHOR
Carl Franks
ACKNOWLEDGEMENTS
Thanks to "Curtis "Ovid" Poe" for the "ALTERING JUNCTIONS" changes in release 0.40000.
COPYRIGHT AND LICENSE
Copyright 2005, Carl Franks. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself (perlgpl, perlartistic).
perl v5.18.2 2013-08-21 Perl6::Junction(3)