10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi all,
First of all, sorry for the pastebin link. The code tags aren't working for me.
#!/bin/bash # while-menu-dialog: a menu driven - Pastebin.com
This is a channel "changer" shell script i'm working on. It uses dialog to display the menus.
It... (3 Replies)
Discussion started by: ignatius
3 Replies
2. Shell Programming and Scripting
I have a nice program to change the background but I want it to operate on subdirectories as well.
# Script to randomly set Background from files in a directory
while true;do
# Directory Containing Pictures
DIR="/home/pc/Pictures"
# Internal Field Separator set to newline, so file names... (4 Replies)
Discussion started by: triplemaya
4 Replies
3. Shell Programming and Scripting
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies
4. Shell Programming and Scripting
Hello,
From the URL
https://www.unix.com/shell-programming-scripting/121303-remove-path-path-environment-variable-2.html
I got a function to remove the directories from a path. but looks like this isnt quite working.. i am also not able to post the comments in the thread as it is closed.
... (6 Replies)
Discussion started by: satishkumar432
6 Replies
5. Shell Programming and Scripting
I need a script that extracts function names from php files together with their location (path and file in which they are defined).
The php files are located in several directories under a base directory.
Ideally the output should be something like:
"Path/FileName/FunctionName" for a... (2 Replies)
Discussion started by: bamse
2 Replies
6. Shell Programming and Scripting
I have this problem using a script that uses mplayer. This is the error messages.
INFO: Mplayer Log
LOG: MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
LOG: mplayer: could not connect to socket
LOG: mplayer: No such file or directory
LOG: Failed to open LIRC support. You... (1 Reply)
Discussion started by: locoroco
1 Replies
7. Ubuntu
Hi
I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:
I want expect script for random passwords and random commands generation.
please can anyone help me?
Many Thanks in advance (0 Replies)
Discussion started by: vanid
0 Replies
8. Solaris
Hi all ...
I would like to know how to install mplayer on solaris 10
i have been trying to understand it through the docs on their website
but didnt get it that well..
So if anyone can give me step by step instructions to install it ..i would much appreciate it!!!
Thanks (3 Replies)
Discussion started by: wrapster
3 Replies
9. Shell Programming and Scripting
hi,
I need a command which picks the records randomly from the file.
For example. i am having some 10000 entries in a file and need to extract the lines randomly without repeating the numbers.
Do anybody have any idea on how to get this out. (4 Replies)
Discussion started by: prash_b
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm a beginner in linux :(
I wanna play divx with MPlayer. I have mdk8.1 and I can't install MPlayer because I have gcc 2.96
I need upgrade my gcc to 2.95.2 or 2.95.4
Anyone can say me how do i do to uninstall gcc-2.96 and install gcc-2.95.2. Can you give me the exactly url to... (1 Reply)
Discussion started by: mercutio
1 Replies
MooseX::MultiMethods(3pm) User Contributed Perl Documentation MooseX::MultiMethods(3pm)
NAME
MooseX::MultiMethods - Multi Method Dispatch based on Moose type constraints
VERSION
version 0.10
SYNOPSIS
package Paper; use Moose;
package Scissors; use Moose;
package Rock; use Moose;
package Lizard; use Moose;
package Spock; use Moose;
package Game;
use Moose;
use MooseX::MultiMethods;
multi method play (Paper $x, Rock $y) { 1 }
multi method play (Paper $x, Spock $y) { 1 }
multi method play (Scissors $x, Paper $y) { 1 }
multi method play (Scissors $x, Lizard $y) { 1 }
multi method play (Rock $x, Scissors $y) { 1 }
multi method play (Rock $x, Lizard $y) { 1 }
multi method play (Lizard $x, Paper $y) { 1 }
multi method play (Lizard $x, Spock $y) { 1 }
multi method play (Spock $x, Rock $y) { 1 }
multi method play (Spock $x, Scissors $y) { 1 }
multi method play (Any $x, Any $y) { 0 }
my $game = Game->new;
$game->play(Paper->new, Rock->new); # 1, Paper covers Rock
$game->play(Spock->new, Paper->new); # 0, Paper disproves Spock
$game->play(Spock->new, Scissors->new); # 1, Spock smashes Scissors
DESCRIPTION
This module provides multi method dispatch based on Moose type constraints. It does so by providing a "multi" keyword that extends the
"method" keyword provided by MooseX::Method::Signatures.
When invoking a method declared as "multi" a matching variant is being searched in all the declared multi variants based on the passed
parameters and the declared type constraints. If a variant has been found, it will be invoked. If no variant could be found, an exception
will be thrown.
AUTHOR
Florian Ragwitz <rafl@debian.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.10.1 2010-01-03 MooseX::MultiMethods(3pm)