Sponsored Content
Operating Systems Solaris rm -r does not disable interactive prompt Post 302262244 by vgersh99 on Wednesday 26th of November 2008 07:07:56 PM
Old 11-26-2008
Quote:
Originally Posted by jlliagre
Or better, remove that alias in the first place which is a "false good idea".
.... not unless you ever attempted to 'rm *' 1 hour before the project deadline (been there... - yes, my nick name is "paranoid" Smilie )
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Interactive Mode?

:confused: Can anyone please tell me how to get into Interactive Mode? (2 Replies)
Discussion started by: Nomad
2 Replies

2. Homework & Coursework Questions

Help with Interactive / Non Interactive Shell script

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines. It then prompts for deletion of the file. If user supplies arguments with the script , then it works on those files... (1 Reply)
Discussion started by: rits
1 Replies

3. Homework & Coursework Questions

How to write script that behaves both in interactive and non interactive mode

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines. It then prompts for deletion of the file. If user supplies arguments with the script , then it works on those files... (8 Replies)
Discussion started by: rits
8 Replies

4. Shell Programming and Scripting

How to disable Enable/Disable Tab Key

Hi All, I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:( Thanks, Rico (1 Reply)
Discussion started by: carnegiex
1 Replies

5. Solaris

New interactive installation

I just took delivery of an Ultra Sparc 60 box. I tried to install Solaris 10 from the cdrom by issuing the following command at ok prompt: ok boot cdrom, and I am getting an error message that says: "Boot device: /pci@1f,4000/scsi@3/disk@6,0:f File and args: can't open boot device. What am I... (2 Replies)
Discussion started by: ijeoma
2 Replies

6. Red Hat

SSL/TLS renegotiation DoS -how to disable? Is it advisable to disable?

Hi all Expertise, I have following issue to solve, SSL / TLS Renegotiation DoS (low) 222.225.12.13 Ease of Exploitation Moderate Port 443/tcp Family Miscellaneous Following is the problem description:------------------ Description The remote service encrypts traffic using TLS / SSL and... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

7. Solaris

How to disable/bypass passphrase prompt in ssh?

Hi Folks, I have setup a passwordless connection from my Linux ( source) machine toSolaris ( destination ) machine. I have added passphrase while creating the rsa key. Now problem is each time when i make a connection i have to give the passphrase to make connection. How to override this ? I... (4 Replies)
Discussion started by: chidori
4 Replies

8. Shell Programming and Scripting

Nslookup how to remove interactive prompt

I am running this command $ echo -en "set q=any\nwww.google.com\nexit\n" | nslookup | grep AAAA > > > www.google.com has AAAA address 2607:f8b0:400c:c01::93 Can someone help to remove displaying these "> " characters (3 Replies)
Discussion started by: stobo
3 Replies

9. UNIX for Dummies Questions & Answers

How to Change the % prompt to - prompt in UNIX?

how to Change the % prompt to - prompt in unix :wall: ---------- Post updated at 07:40 AM ---------- Previous update was at 07:38 AM ---------- How To display the last modification time of any file in unix ---------- Post updated at 07:40 AM ---------- Previous update was at 07:40 AM... (2 Replies)
Discussion started by: manjiri sawant
2 Replies

10. Solaris

Unable to move from rsc prompt to ok prompt

Hi, on sunfire v890 unable to move from rsc prompt to ok prompt, i have executed the command break. (9 Replies)
Discussion started by: manoj.solaris
9 Replies
POE::Component::IRC::Plugin::BotCommand(3pm)		User Contributed Perl Documentation	      POE::Component::IRC::Plugin::BotCommand(3pm)

NAME
POE::Component::IRC::Plugin::BotCommand - A PoCo-IRC plugin which handles commands issued to your bot SYNOPSIS
use POE; use POE::Component::Client::DNS; use POE::Component::IRC; use POE::Component::IRC::Plugin::BotCommand; my @channels = ('#channel1', '#channel2'); my $dns = POE::Component::Client::DNS->spawn(); my $irc = POE::Component::IRC->spawn( nick => 'YourBot', server => 'some.irc.server', ); POE::Session->create( package_states => [ main => [ qw(_start irc_001 irc_botcmd_slap irc_botcmd_lookup dns_response) ], ], ); $poe_kernel->run(); sub _start { $irc->plugin_add('BotCommand', POE::Component::IRC::Plugin::BotCommand->new( Commands => { slap => 'Takes one argument: a nickname to slap.', lookup => 'Takes two arguments: a record type (optional), and a host.', } )); $irc->yield(register => qw(001 botcmd_slap botcmd_lookup)); $irc->yield(connect => { }); } # join some channels sub irc_001 { $irc->yield(join => $_) for @channels; return; } # the good old slap sub irc_botcmd_slap { my $nick = (split /!/, $_[ARG0])[0]; my ($where, $arg) = @_[ARG1, ARG2]; $irc->yield(ctcp => $where, "ACTION slaps $arg"); return; } # non-blocking dns lookup sub irc_botcmd_lookup { my $nick = (split /!/, $_[ARG0])[0]; my ($where, $arg) = @_[ARG1, ARG2]; my ($type, $host) = $arg =~ /^(?:(w+) )?(S+)/; my $res = $dns->resolve( event => 'dns_response', host => $host, type => $type, context => { where => $where, nick => $nick, }, ); $poe_kernel->yield(dns_response => $res) if $res; return; } sub dns_response { my $res = $_[ARG0]; my @answers = map { $_->rdatastr } $res->{response}->answer() if $res->{response}; $irc->yield( 'notice', $res->{context}->{where}, $res->{context}->{nick} . (@answers ? ": @answers" : ': no answers for "' . $res->{host} . '"') ); return; } DESCRIPTION
POE::Component::IRC::Plugin::BotCommand is a POE::Component::IRC plugin. It provides you with a standard interface to define bot commands and lets you know when they are issued. Commands are accepted as channel or private messages. The plugin will respond to the 'help' command by default, listing available commands and information on how to use them. However, if you add a help command yourself, that one will be used instead. METHODS
"new" 'Commands', a hash reference, with your commands as keys, and usage information as values. If the usage string contains newlines, the plugin will send one message for each line. Accepting commands 'In_channels', a boolean value indicating whether to accept commands in channels. Default is true. 'In_private', a boolean value indicating whether to accept commands in private. Default is true. 'Addressed', requires users to address the bot by name in order to issue commands. Default is true. 'Prefix', a string which all commands must be prefixed with (except in channels when 'Addressed' is true). Default is '!'. You can set it to '' to allow bare commands. 'Bare_private', a boolean value indicating whether bare commands (without the prefix) are allowed in private messages. Default is false. Authorization 'Auth_sub', a subroutine reference which, if provided, will be called for every command. The subroutine will be called in list context. If the first value returned is true, the command will be processed as normal. If the value is false, then no events will be generated, and an error message will possibly be sent back to the user. You can override the default error message by returning a second value, an array reference of (zero or more) strings. Each string will be sent as a message to the user. Your subroutine will be called with the following arguments: 1. The IRC component object 2. The nick!user@host of the user 3. The place where the command was issued (the nickname of the user if it was in private) 4. The name of the command 5. The command argument string 'Ignore_unauthorized', if true, the plugin will ignore unauthorized commands, rather than printing an error message upon receiving them. This is only relevant if 'Auth_sub' is also supplied. Default is false. Miscellaneous 'Ignore_unknown', if true, the plugin will ignore undefined commands, rather than printing a help message upon receiving them. Default is false. 'Method', how you want help messages to be delivered. Valid options are 'notice' (the default) and 'privmsg'. 'Eat', set to true to make the plugin hide "irc_public" events from other plugins when they look like commands. Probably only useful when a 'Prefix' is defined. Default is false. Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method. "add" Adds a new command. Takes two arguments, the name of the command, and a string containing its usage information. Returns false if the command has already been defined, true otherwise. "remove" Removes a command. Takes one argument, the name of the command. Returns false if the command wasn't defined to begin with, true otherwise. "list" Takes no arguments. Returns a list of key/value pairs, the keys being the command names and the values being the usage strings. OUTPUT EVENTS
"irc_botcmd_*" You will receive an event like this for every valid command issued. E.g. if 'slap' were a valid command, you would receive an "irc_botcmd_slap" event every time someone issued that command. It receives the following arguments: o "ARG0": the nick!hostmask of the user who issued the command. o "ARG1" is the name of the channel in which the command was issued, or the sender's nickname if this was a private message. o "ARG2": a string of arguments to the command, or undef if there were no arguments AUTHOR
Hinrik Oern Sigur`sson, hinrik.sig@gmail.com perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::BotCommand(3pm)
All times are GMT -4. The time now is 02:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy