02-10-2014
Perfect -- thanks *very* much. I had guessed my way through things and by brute force had gotten some things working, but your reply cleared everything up perfectly.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I'm writing a long script for bash (on RHEL 5.0) to execute many commands. So, my idea is to create a function to deal with error checking and logging (see ceckoutput() below). This works with all commands except for sed. I think it may be a problems with escaped characters. So I did the... (4 Replies)
Discussion started by: macL
4 Replies
2. Ubuntu
Is there a way to migrate username password from Freebsd 6.1 to Linux Ubuntu 8.04. I am using the server as a email server running postfix and using imap. Is there a way to transfer the usernames and password. I have transferred all the Maildirs but I am getting uid errors and gid errors even after... (2 Replies)
Discussion started by: rbizzell
2 Replies
3. Shell Programming and Scripting
I'm sure this is simple and I've been looking at examples for days on end but can't seem to come to grips with awk. What I have:
mplayer -v dvd:// -identify -vo null -ao null -nolirc -nojoystick -frames 0 2>/dev/null >> /tmp/MplayerOut
ChapterStart=($(grep CHAPTERS: /tmp/MplayerOut |sed... (3 Replies)
Discussion started by: rickenbacherus
3 Replies
4. Programming
Hello everyone...
I'm trying to find an interesting project to work on
for my master thesis. I like GNU/Linux C development
and BASH scripting. Please give me any idea that
flashes in your mind.
I thank you in advance... (3 Replies)
Discussion started by: jonx
3 Replies
5. HP-UX
Hi all,
We have an application that is running on HP-UX operating system (11i). the application is built using C, C++, ProC and ProC++ codes.
we have been given two choices for migration: LINUX and SOLARIS.
I would like to know the differences between the three OS and which OS to prefer... (3 Replies)
Discussion started by: pb0069950
3 Replies
6. Linux
Hello all,
We would be migrating from HP-UX 11 to Red Hat Linux 5 shortly. On HP-UX we've been using RCS (Revision Control system). On RHEL I think there is an equivilant utility called Subversion..Is there a way to export the current contents from RCS in HP-UX and import it into Linux's... (2 Replies)
Discussion started by: luft
2 Replies
7. AIX
hey frnds I am trying to migrate a bash script over the AIX machine , but was getting error with ps and read commands, so I make the few changes in script and have also chnaged the shell from bash to ksh
below is my script... (5 Replies)
Discussion started by: sumit_saxena
5 Replies
8. Shell Programming and Scripting
Original script written on CentOS 6.3 with GNU bash 4.1.2
Destination system is Solaris 9 with GNU bash 2.05 (not changeable by me)
I have a script written on the linux side but now we need to provide a version to another site that "doesn't like linux". I've been going through changing the ] or... (13 Replies)
Discussion started by: oly_r
13 Replies
9. Shell Programming and Scripting
Hi
I keep getting the following error
sed: -e expression #1, char 32: unterminated `s' command
sed: -e expression #1, char 35: unterminated `s' command
sed: -e expression #1, char 35: unterminated `s' command
whenever I use the following bash script
#! /bin/bash... (2 Replies)
Discussion started by: spbr
2 Replies
LEARN ABOUT DEBIAN
file::find::object::rule::extending
File::Find::Object::Rule::Extending(3pm) User Contributed Perl Documentation File::Find::Object::Rule::Extending(3pm)
NAME
File::Find::Object::Rule::Extending - the mini-guide to extending File::Find::Object::Rule
SYNOPSIS
package File::Find::Object::Rule::Random;
use strict;
use warnings;
# take useful things from File::Find::Object::Rule
use base 'File::Find::Object::Rule';
# and force our crack into the main namespace
sub File::Find::Object::Rule::random () {
my $self = shift()->_force_object;
$self->exec( sub { rand > 0.5 } );
}
1;
DESCRIPTION
File::Find::Object::Rule inherits File::Find::Rule's extensibility. It is now possibile to extend it, using the following conventions.
Declare your package
package File::Find::Object::Rule::Random;
use strict;
use warnings;
Inherit methods from File::Find::Object::Rule
# take useful things from File::Find::Object::Rule
use base 'File::Find::Object::Rule';
Force your madness into the main package
# and force our crack into the main namespace
sub File::Find::Object::Rule::random () {
my $self = shift()->_force_object;
$self->exec( sub { rand > 0.5 } );
}
Yes, we're being very cavalier here and defining things into the main File::Find::Object::Rule namespace. This is due to lack of
imaginiation on my part - I simply can't find a way for the functional and oo interface to work without doing this or some kind of
inheritance, and inheritance stops you using two File::Find::Object::Rule::Foo modules together.
For this reason try and pick distinct names for your extensions. If this becomes a problem then I may institute a semi-official registry
of taken names.
Taking no arguments.
Note the null prototype on random. This is a cheat for the procedural interface to know that your sub takes no arguments, and so allows
this to happen:
find( random => in => '.' );
If you hadn't declared "random" with a null prototype it would have consumed "in" as a parameter to it, then got all confused as it doesn't
know about a '.' rule.
NOTES ABOUT THE CALLBACK
The callback can access the File::Find::Object::Result using "$self->finder->item_obj()".
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
Copyright (C) 2002 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
File::Find::Object::Rule
File::Find::::Rule::MMagic was the first extension module for File::Find::Rule, so maybe check that out.
perl v5.14.2 2012-05-05 File::Find::Object::Rule::Extending(3pm)