Watch out : since the -prune does not examine any directories or files in the directory structure below the pattern just matched, its position in the command line matter : you may want to put it on first position (at least, it does as far as i have tested on a solaris machine)
We 've just cross posted, i have updated my previous post you can get a look at it back again
I have a Korn shell script that executes a number of commands on a remote server.
Is it possible to feed in the last exit code of the rsh commands (i.e. something like $?) to a variable within the local shell script?
I tried the following:
returncode=$(rsh spns31 ".... (1 Reply)
i have to run set of commands
command1
command2
command3
command4
Now Whenever any of these command fails i should quit while capturing error message.
Is there a better way then checking for $? after each command. (1 Reply)
Hi,
I am wondering how I can check the return value of all commands in a pipe such as
gzip -dc file.gz | sort -u > output.txt
If I run this sequence in bash and check $?, I get the return status from sort. But I want to know if the initial gzip failed.
Similarly for longer pipe chains,... (6 Replies)
Hello
I have a script which emails identifies the user ID of a user and sends them an email. A user can enter part of the name of the person he/wants to send the email to. Then I use the ypcat command to identify the UID of that person.
The problem I'm having, is building in an error trap... (1 Reply)
Hi
I want to output the results of multiple commands to a single file.
I use simple Ping, telnet commands to check the connectivity to many servers.
Can i execute all the commands and write the output to a file instead of executing them one by one?
Thanks
Ashok (2 Replies)
This is a three step process:
a) Upload date ->scrub\prep data,
b) insert into db,
c) return php results page.
I have a question about the best practices for unix to process this.
I have data from a flat file that I've scrubbed and cleaned with sed and awk. When it is complete I have an... (0 Replies)
Good day every one.
When a use df -h comand on my read hat linux server i get something like this:
/dev/mapper/Vg02-Lv19 30G 29G 145M 100% /app
Then when i do du -sh /app/
i get
12G /app/
For me it is meaning that only 12G was used on /app partition.
How can i see where are... (9 Replies)
cmd()
{
echo " "
echo "$(whoami)@$(hostname):$(pwd)# $*"
results=`eval $*`
echo $results
}
I want to get the eval $* 's return value and pass it to a new variable $val, and get "eval $*" 's the ... (7 Replies)
Hello and thanks in advance for any help anyone can offer me
I'm trying to learn the find command and thought I was understanding it... Apparently I was wrong. I was doing compound searches and I started getting weird results with the -size test. I was trying to do a search on a 1G file owned by... (14 Replies)
Discussion started by: bodisha
14 Replies
LEARN ABOUT MOJAVE
cpanplus::shell::default5.18
CPANPLUS::Shell::Default(3pm) Perl Programmers Reference Guide CPANPLUS::Shell::Default(3pm)NAME
CPANPLUS::Shell::Default - the default CPANPLUS shell
SYNOPSIS
### loading the shell:
$ cpanp # run 'cpanp' from the command line
$ perl -MCPANPLUS -eshell # load the shell from the command line
use CPANPLUS::Shell qw[Default]; # load this shell via the API
# always done via CPANPLUS::Shell
my $ui = CPANPLUS::Shell->new;
$ui->shell; # run the shell
$ui->dispatch_on_input( input => 'x'); # update the source using the
# dispatch method
### when in the shell:
### Note that all commands can also take options.
### Look at their underlying CPANPLUS::Backend methods to see
### what options those are.
cpanp> h # show help messages
cpanp> ? # show help messages
cpanp> m Acme # find acme modules, allows regexes
cpanp> a KANE # find modules by kane, allows regexes
cpanp> f Acme::Foo # get a list of all releases of Acme::Foo
cpanp> i Acme::Foo # install Acme::Foo
cpanp> i Acme-Foo-1.3 # install version 1.3 of Acme::Foo
cpanp> i <URI> # install from URI, like ftp://foo.com/X.tgz
cpanp> i <DIR> # install from an absolute or relative directory
cpanp> i 1 3..5 # install search results 1, 3, 4 and 5
cpanp> i * # install all search results
cpanp> a KANE; i *; # find modules by kane, install all results
cpanp> t Acme::Foo # test Acme::Foo, without installing it
cpanp> u Acme::Foo # uninstall Acme::Foo
cpanp> d Acme::Foo # download Acme::Foo
cpanp> z Acme::Foo # download & extract Acme::Foo, then open a
# shell in the extraction directory
cpanp> c Acme::Foo # get a list of test results for Acme::Foo
cpanp> l Acme::Foo # view details about the Acme::Foo package
cpanp> r Acme::Foo # view Acme::Foo's README file
cpanp> o # get a list of all installed modules that
# are out of date
cpanp> o 1..3 # list uptodateness from a previous search
cpanp> s conf # show config settings
cpanp> s conf md5 1 # enable md5 checks
cpanp> s program # show program settings
cpanp> s edit # edit config file
cpanp> s reconfigure # go through initial configuration again
cpanp> s selfupdate # update your CPANPLUS install
cpanp> s save # save config to disk
cpanp> s mirrors # show currently selected mirrors
cpanp> ! [PERL CODE] # execute the following perl code
cpanp> b # create an autobundle for this computers
# perl installation
cpanp> x # reload index files (purges cache)
cpanp> x --update_source # reload index files, get fresh source files
cpanp> p [FILE] # print error stack (to a file)
cpanp> v # show the banner
cpanp> w # show last search results again
cpanp> q # quit the shell
cpanp> e # exit the shell and reload
cpanp> /plugins # list available plugins
cpanp> /? PLUGIN # list help test of <PLUGIN>
### common options:
cpanp> i ... --skiptest # skip tests
cpanp> i ... --force # force all operations
cpanp> i ... --verbose # run in verbose mode
DESCRIPTION
This module provides the default user interface to "CPANPLUS". You can start it via the "cpanp" binary, or as detailed in the SYNOPSIS.
BUG REPORTS
Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>.
AUTHOR
This module by Jos Boumans <kane@cpan.org>.
COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved.
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
SEE ALSO
CPANPLUS::Shell::Classic, CPANPLUS::Shell, cpanp
perl v5.18.2 2014-01-06 CPANPLUS::Shell::Default(3pm)