Thanks so much for the help! I modified my code to make a normal shell file instead of a nautilus script and ended up with this
and just put the files i want to convert in /home/nick/Desktop/Dose Files. Thanks for the help those few commands were exactly what i needed.
hi scripting experts,
juz wondering if it's possible to have multiple rsh command in a single script? :confused:
ie:
rsh -l <username> "<command>"
rsh -l <username> "<command>"
thanks.
regards,
wee :) (0 Replies)
I have 5 hosts and each host as 3 java process .I have one machine which has ssh keys so it can login without any passwords etc to all the machines.
How can I find out say jstack or some command so it goes to each machine and run the command . For example machine 1 has 3 java process and they... (2 Replies)
Hi,
I would like a shell script that reads all files in a directory and concatenate them. It is not a simple concatenation. The first few lines of the files should not be included. The lines to be included are the lines from where 'START HERE' appears up to the end of the file. For example, I... (4 Replies)
I am trying to come up with a script that will search for selected files and then email them to me.
For example, say I have a directory that has the following files:
AA_doug.txt
AA_andy.txt
BB_john.txt
APPLE_mike.txt
GLOBE_ed.txt
GLOBE_tony.txt
TOTAL_carl.txt
what is the best way to... (2 Replies)
Ok, so this question is probably much easier than I'm making it, and thus why I've spent almost 2 hours now on this :wall:. I'm trying to use a command that reads out specific data from a file and and saves it to another file. The code is only a few lines, and here it is below:
#!/bin/csh
... (4 Replies)
Hi,
I would like to ask some assistance about my new install sparc64 debian 6.0.3 in a sun blade 150 Hardware.i having this problem in a nautilus file manager in the below panel, it keeps open and closing (multiple file manager process starting and dying) this in result of 100 percent cpu load,... (0 Replies)
Hi
Can we run the linux command and per script in a single command
$ cd /usr/local/adm/ ;ctsv scmtest_qabuild ;cspec.pl scmtest
This is a combination of linux and clearcase command and last one is perl script with argument.
I can see the first and 2nd coomand is executing but last... (6 Replies)
Hello ,
I am trying to create a layer of file-tagging trough bash scripting and tlc/tk .
I have almost everything ready only needs to be able to launch nautilus (the gnome file manager) with a regular expresion; when searching information in internet with "script and nautilus", i only find... (3 Replies)
Hi I have folders 1 to 24 (24 folders in total) and inside those folders I have the same file names. I have a command that I want to run but rather than do it individually I was wondering if there is a command to run them all at once.
Thanks
Phil (3 Replies)
I have several problems with my problems: I hope you can help me.
1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error.
For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Discussion started by: dellanicholson
0 Replies
LEARN ABOUT DEBIAN
poe::component::irc::cookbook::seen
POE::Component::IRC::Cookbook::Seen(3pm) User Contributed Perl Documentation POE::Component::IRC::Cookbook::Seen(3pm)NAME
POE::Component::IRC::Cookbook::Seen - Implement the 'seen' command
SYNOPSIS
This little bot tracks the whereabouts of users and allows you to retrieve that information on command.
19:59:51 * seen_bot (n=hinrik@pool-71-164-43-32.chrlwv.east.verizon.net) has joined #test_channel1
19:59:55 <foo> bar
20:00:16 * seen_bot has quit (Remote closed the connection)
20:00:27 * seen_bot (n=hinrik@pool-71-164-43-32.chrlwv.east.verizon.net) has joined #test_channel1
20:00:29 <literal> seen_bot: seen seen_bot
20:00:29 <seen_bot> literal: I last saw seen_bot at Mon Sep 22 20:00:27 2008 joining #test_channel1
20:00:34 <literal> seen_bot: seen foo
20:00:40 <seen_bot> literal: I last saw foo at Mon Sep 22 19:59:56 2008 on #test_channel1 saying: bar
20:00:45 <literal> seen_bot: seen baz
20:00:48 <seen_bot> literal: I haven't seen baz
DESCRIPTION
#!/usr/bin/env perl
use strict;
use warnings;
use IRC::Utils qw(parse_user lc_irc);
use POE;
use POE::Component::IRC::State;
use POE::Component::IRC::Plugin::AutoJoin;
use POE::Component::IRC::Plugin::BotCommand;
use Storable;
use constant {
USER_DATE => 0,
USER_MSG => 1,
DATA_FILE => 'seen',
SAVE_INTERVAL => 20 * 60, # save state every 20 mins
};
my $seen = { };
$seen = retrieve(DATA_FILE) if -s DATA_FILE;
POE::Session->create(
package_states => [
main => [ qw(
_start
irc_botcmd_seen
irc_ctcp_action
irc_join
irc_part
irc_public
irc_quit
save
)]
],
);
$poe_kernel->run();
sub _start {
my ($kernel, $heap) = @_[KERNEL, HEAP];
my $irc = POE::Component::IRC::State->spawn(
Nick => 'seen_bot',
Server => 'irc.freenode.net',
);
$heap->{irc} = $irc;
$irc->plugin_add('AutoJoin', POE::Component::IRC::Plugin::AutoJoin->new(
Channels => [ '#test_channel1', '#test_channel2' ]
));
$irc->plugin_add('BotCommand', POE::Component::IRC::Plugin::BotCommand->new(
Commands => {
seen => 'Usage: seen <nick>'
}
));
$irc->yield(register => qw(ctcp_action join part public quit botcmd_seen));
$irc->yield('connect');
$kernel->delay_set('save', SAVE_INTERVAL);
return;
}
sub save {
my $kernel = $_[KERNEL];
warn "storing
";
store($seen, DATA_FILE) or die "Can't save state";
$kernel->delay_set('save', SAVE_INTERVAL);
}
sub irc_ctcp_action {
my $nick = parse_user($_[ARG0]);
my $chan = $_[ARG1]->[0];
my $text = $_[ARG2];
add_nick($nick, "on $chan doing: * $nick $text");
}
sub irc_join {
my $nick = parse_user($_[ARG0]);
my $chan = $_[ARG1];
add_nick($nick, "joining $chan");
}
sub irc_part {
my $nick = parse_user($_[ARG0]);
my $chan = $_[ARG1];
my $text = $_[ARG2];
my $msg = 'parting $chan';
$msg .= " with message '$text'" if defined $text;
add_nick($nick, $msg);
}
sub irc_public {
my $nick = parse_user($_[ARG0]);
my $chan = $_[ARG1]->[0];
my $text = $_[ARG2];
add_nick($nick, "on $chan saying: $text");
}
sub irc_quit {
my $nick = parse_user($_[ARG0]);
my $text = $_[ARG1];
my $msg = 'quitting';
$msg .= " with message '$text'" if defined $text;
add_nick($nick, $msg);
}
sub add_nick {
my ($nick, $msg) = @_;
$seen->{lc_irc($nick)} = [time, $msg];
}
sub irc_botcmd_seen {
my ($heap, $nick, $channel, $target) = @_[HEAP, ARG0..$#_];
$nick = parse_user($nick);
my $irc = $heap->{irc};
if ($seen->{lc_irc($target)}) {
my $date = localtime $seen->{lc_irc($target)}->[USER_DATE];
my $msg = $seen->{lc_irc($target)}->[USER_MSG];
$irc->yield(privmsg => $channel, "$nick: I last saw $target at $date $msg");
}
else {
$irc->yield(privmsg => $channel, "$nick: I haven't seen $target");
}
}
AUTHOR
Hinrik Oern Sigur`sson, hinrik.sig@gmail.com
perl v5.14.2 2011-12-07 POE::Component::IRC::Cookbook::Seen(3pm)