01-07-2010
Hi,
I don't know if you observed or not, I am running a loop. In this loop I am repeating this activity in all the folders.
I am sure that would be tedious to do it through bash.
Let me know.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello friends ,
I need a help how to call the variable which has define in the shell script in the perl command line.
example of the shell scrip :
str="hell0"
i want print the value of this variable in the perl command line.
perl -e 'print $str'
but this is not working .
can... (2 Replies)
Discussion started by: venky_2_2000
2 Replies
2. UNIX for Advanced & Expert Users
Hi All,
I am using the following command to invoke the shell script from a perl command.
perl -i.bak -pe'BEGIN { $cmd = "/opt/coreservices/tomcat-5.5.9/bin/digest.sh -a sha"; }
s/(password=")(*)/
$1.`$cmd $2|cut -d: -f2|tr -d "\n"`
/e
' $CATALINA_HOME/conf/tomcat-users.xml
I need... (1 Reply)
Discussion started by: nua7
1 Replies
3. Shell Programming and Scripting
Does not work.
#!/usr/bin/perl
$etcdir = 'ls -l /etc';
print $etcdir;
#END
------------result--------
#perl -w abc123.pl
ls -l /etc
#
This method works.
#!/usr/bin/perl
$etcdir = system("ls -l /etc");
print $etcdir;
#END (2 Replies)
Discussion started by: dplinux
2 Replies
4. UNIX for Dummies Questions & Answers
perl script i am using for search and replace is not working as expected...
I am using it for in-place search/replace.
I am new to perl, can someone please help me solving the issue here.
########SCRIPT
#!/bin/sh
var="abc"
var2="def"
perl -pi -e 's/${var}/def/g' testfile
exit 0
... (0 Replies)
Discussion started by: manishma71
0 Replies
5. Shell Programming and Scripting
Hi ,
I have a ps command inside perl script :
ps -ef | egrep tail_file.pl | egrep -v egrep | awk '{print $2}' | egrep $pid
through shell it's working fine . The same coammnd when executed through PERL , it'd displaying all the results
oracle 10141 1 0 2010 ? ... (5 Replies)
Discussion started by: talashil
5 Replies
6. Shell Programming and Scripting
Can we pass perl variable to shell commands. If yes, please give some example. (2 Replies)
Discussion started by: Anjan1
2 Replies
7. Shell Programming and Scripting
Whenever the shell script is invoked by the scheduler the command execution return code is always captured as 0(Success).
If the same shell script is executed in command line via unix terminal, the command execution return code's are captured properly.
For example:
ls -ltr es_wrong_file ---->... (5 Replies)
Discussion started by: vemal
5 Replies
8. Shell Programming and Scripting
Hi,
I would like to use a shell variable $amp in my perl command line.
for fa in $WORKSPACE/*.fa; do
amp=`grep ">.*" $fa | sed -e's#>\(.*\)#\1#g'`
ampsam="$WORKSPACE/$base/$base.$amp.sam"
sqheader=`grep "^@SQ.*SN:$amp.*" $sam`
printf "$sqheader\n" >> $ampsam
... (3 Replies)
Discussion started by: jdilts
3 Replies
9. Shell Programming and Scripting
Hi,
I have a shell script, In which i have variable "var1" and some perl command inside shell script.
export var1='coep -n rst-a2p-hinje.vci.all.com -c'
perl -pi -e 's/^/coep -n rst-a2p-hinje.vci.all.com -c /' command.txt
currently I am adding value of var1 in command.txt file by... (2 Replies)
Discussion started by: rakeshtomar82
2 Replies
10. Shell Programming and Scripting
On our OS I don't have Perl df command. How can I use shell commands from Perl scripts? (6 Replies)
Discussion started by: digioleg54
6 Replies
LEARN ABOUT DEBIAN
cpanplus::shell::default
CPANPLUS::Shell::Default(3perl) Perl Programmers Reference Guide CPANPLUS::Shell::Default(3perl)
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> /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.14.2 2014-09-29 CPANPLUS::Shell::Default(3perl)