9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Experts ,
I have an use case which needed your help . I have been using google for 2 days buy couldn`t succed , i believe i can get the help here.
Here is my use case to run on bash shell
1. Access an URL -- in script , it will be mentioned as inputURL
2. Once i accessed the URL... (5 Replies)
Discussion started by: radha254
5 Replies
2. Shell Programming and Scripting
Hello Experts ,
I have an use case which needed your help . I have been using google for 2 days buy couldn`t succed , i believe i can get the help here.
Here is my use case to run on bash shell
1. Access an URL -- in script , it will be mentioned as inputURL
2. Once i accessed the URL... (1 Reply)
Discussion started by: radha254
1 Replies
3. Shell Programming and Scripting
Hi Guru's,
i am creating a script that will update menu of either complete or failed.
#!/bin/bash
choice=0
while
do
echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""
echo " ###############################################"
echo " # Choose... (3 Replies)
Discussion started by: reignangel2003
3 Replies
4. Shell Programming and Scripting
Hello,
im having bash script with
while ***
command1 &&
command2 &&
command3 &&
done
i want to ask how i can prevent overloading server, by waiting untill all commands complete? any low resources intensive command like "wait" - i dont know if exist? (2 Replies)
Discussion started by: postcd
2 Replies
5. Red Hat
Hi,
In the archives I found this:
And this works fine.
$if mode=vi
"\C-0-": digit-argument
TAB: menu-complete
"\e
But what I want is to reverse this. So I want that tab does reverse menu completion and shift tab does normal menu completion.
Can anyone help me with this? Thanks (0 Replies)
Discussion started by: ozkanb
0 Replies
6. Shell Programming and Scripting
Below is the sample file:
287 DEBUG syndesis.pb.util.ITraceManager - syOID=ELntNetwork:1005Mon Oct 15 17:18:21 IST 2012 <ELClientManagerenEmsSession() > Setting Java Properties
287 DEBUG syndesis.pb.util.ITraceManager - syOID=ELntNetwork:1005Mon Oct 15 17:18:21 IST 2012... (1 Reply)
Discussion started by: ashok.kumar
1 Replies
7. HP-UX
Hello there, first post here so go easy on me! :D
I just aquired an old HP 9000 Dclass d220 server, all I know is that it's running HP-UX, and it appears to boot fine (I see the modules loading, etc..)
Now, I have been an MS guy all my life (yeah I know, make fun of me), so I really have no... (9 Replies)
Discussion started by: Marvio
9 Replies
8. Programming
Ok, so I have done the 'mathematical part' just I am not sure where to put them in and how to get them to return answers.
public class Main {
public static void main(String args) {
}
//Part A.
//1&2- Computes the sum andproduct of all of the elements of the array a.
... (5 Replies)
Discussion started by: HardyV2
5 Replies
9. Shell Programming and Scripting
Hi All,
I need some help to complete the below script, after executing below script blank lines are coming, but i am expecting 4 digit numeric no. Please solve the issue ASAP.
function portno
{
while (true)
do
random=`echo $RANDOM | cut -c 1-4`
port=`netstat -a | grep -c $random`
... (5 Replies)
Discussion started by: sridhusha
5 Replies
Path::Dispatcher::Cookbook(3pm) User Contributed Perl Documentation Path::Dispatcher::Cookbook(3pm)
NAME
Path::Dispatcher::Cookbook - A cookbook for Path::Dispatcher
RECIPES
How can I change the path delimiter from a space ' ' to a slash '/'?
When importing the Path::Dispatcher::Declarative sugar, specify the "token_delimiter" option for the "default" group.
package My::Dispatcher;
use Path::Dispatcher::Declarative -base, -default => {
token_delimiter => '/',
};
Or define a subclass of Path::Dispatcher::Declarative with a "token_delimiter" method:
package Web::Dispatcher::Maker;
use base 'Path::Dispatcher::Declarative';
use constant token_delimiter => '/';
package My::Dispatcher;
use Web::Dispatcher::Maker -base;
How can I do rule chaining (like in Catalyst)?
You can use a "chain" rule approximate chaining behavior:
package MyDispatcher;
use Path::Dispatcher::Declarative -base;
under show => sub {
chain {
print "Displaying ";
};
on inventory => sub {
print "inventory:
";
...
};
on score => sub {
print "score:
";
...
};
};
package main;
MyDispatcher->run("show inventory"); # "Displaying inventory:
..."
MyDispatcher->run("show score"); # "Displaying score:
..."
How can I configure tab completion for shells?
First add a dispatcher rule for generating completions based on the path. Here we name it _gencomp, so that if the user types "app _gencomp
hel" it will print out the various completions of "hel".
on qr/^_gencomps*(.*)/ => sub {
my $prefix = shift->pos(1);
$prefix = "" if !defined($prefix);
print "$_
" for dispatcher->complete($prefix);
};
Then tell your shell about how to use _gencomp. For zsh it might look like this (replace "APP" with your binary name):
/usr/share/zsh/site-functions/_APP:
#compdef APP
typeset -a APP_completions
APP_completions=($($words[1] _gencomp $words[2,-1]))
compadd $APP_completions
For bash it might look like this:
/etc/bash_completion.d/APP.bash:
function _APP_()
{
COMPREPLY=($($1 _gencomp ${COMP_WORDS[COMP_CWORD]}))
}
complete -F _APP_ APP
perl v5.12.4 2011-08-30 Path::Dispatcher::Cookbook(3pm)