Sponsored Content
Top Forums Shell Programming and Scripting Using ii for irc chat - scripting assistance? Post 302591478 by radoulov on Thursday 19th of January 2012 03:21:10 PM
Old 01-19-2012
You may try something like this:

Code:
tail -f outputfile | 
  while IFS= read -r ;do
    case $REPLY in
      ( *trigger[1-3]* ) 
          printf '%s\n%s\n' '<some_text>' "$REPLY" >> another_file ;;
    esac
  done

 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripting neophyte needs file manipulation assistance

I need to write two shell scripts for an rsync backup solution. The first script will copy all backed up files into a folder named after the original folder, plus a date stamp (so e.g. if the original folder name is 'foo' and is backed up on the 10th of September, then the backup folder will be... (0 Replies)
Discussion started by: LambdaCalculus
0 Replies

2. Shell Programming and Scripting

Assistance in Perl scripting

PFA file "color.txt". Note : There is no newline character in the file. I have manually inserted the newline char to make it easy to understand. I am expecting out in the form as specified in second file "out.txt" I need a perl script to perform the task. Thanks in advance. (2 Replies)
Discussion started by: deo_kaustubh
2 Replies

3. Shell Programming and Scripting

sed newbie scripting assistance

Howdy folks, I'm trying to craft a log file summarisation tool for an application that creates a lot of duplicate entries with only a different suffix to indicate point of execution. I thought I'd gotten close but I'm clearly missing something. Here's a genericized version: A text_file... (3 Replies)
Discussion started by: mthespian
3 Replies

4. Shell Programming and Scripting

Dhcp.config file scripting assistance

Hello everyone! I am brand new at this forum thing and wanted to thank all of you for your time and help in advance for helping me troubleshoot my issue. I am fairly new to shell scripting and scoured the entire internet to find a solution for my issue to no avail and hope you're able to help. ... (2 Replies)
Discussion started by: sedrocks
2 Replies

5. Shell Programming and Scripting

Noob to scripting needs some assistance

Hello, I am in a Unix class and have been out of town. I have been tasked to generate a couple of scripts and ahve never done it before. I have a virtual machine running Ubuntu. The task is below Prompt the system administrator for all valid input parameters Generate a menu to ask which... (1 Reply)
Discussion started by: jkeeton81
1 Replies
POE::Component::IRC::Plugin::NickReclaim(3pm)		User Contributed Perl Documentation	     POE::Component::IRC::Plugin::NickReclaim(3pm)

NAME
POE::Component::IRC::Plugin::NickReclaim - A PoCo-IRC plugin for reclaiming your nickname SYNOPSIS
use strict; use warnings; use POE qw(Component::IRC Component::IRC::Plugin::NickReclaim); my $nickname = 'Flibble' . $$; my $ircname = 'Flibble the Sailor Bot'; my $ircserver = 'irc.blahblahblah.irc'; my $port = 6667; my $irc = POE::Component::IRC->spawn( nick => $nickname, server => $ircserver, port => $port, ircname => $ircname, ) or die "Oh noooo! $!"; POE::Session->create( package_states => [ main => [ qw(_start) ], ], ); $poe_kernel->run(); sub _start { $irc->yield( register => 'all' ); # Create and load our NickReclaim plugin, before we connect $irc->plugin_add( 'NickReclaim' => POE::Component::IRC::Plugin::NickReclaim->new( poll => 30 ) ); $irc->yield( connect => { } ); return; } DESCRIPTION
POE::Component::IRC::Plugin::NickReclaim - A POE::Component::IRC plugin automagically deals with your bot's nickname being in use and reclaims it when it becomes available again. It registers and handles 'irc_433' events. On receiving a 433 event it will reset the nickname to the 'nick' specified with "spawn" or "connect", appendedwith an underscore, and then poll to try and change it to the original nickname. If someone in your channel who has the nickname you're after quits or changes nickname, the plugin will try to reclaim it immediately. METHODS
"new" Takes one optional argument: 'poll', the number of seconds between nick change attempts, default is 30; Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method. AUTHOR
Chris 'BinGOs' Williams With amendments applied by Zoffix Znet SEE ALSO
POE::Component::IRC perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::NickReclaim(3pm)
All times are GMT -4. The time now is 02:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy