02-16-2011
Thankyou all . I found solution to my problem :
we need to write it as print \$2.
It's PERL ..........
![Mad Smilie](https://www.unix.com/images/smilies/mad.gif)
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
Hi Guys,
I wish to execute some shell commands through PERL.
Here is what I desire to do
1) I wish to find list of directories in current working location
2) Then go in each directory and execute few commands like
a) rm -rf *.log (Shell command)
b) coreBuilder -f cb_tests.tcl (Some... (6 Replies)
Discussion started by: hardik_snps
6 Replies
4. 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
5. 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
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
Hi, the following command works in the terminal no problem.
samtools view -h rawlib.bam | perl -ne '{ @line = split( /\s+/ ); $match = 0; while( $line =~ /(\d+)M/g ) { $match = $match + $1 } if( $match >= 80 || $_ =~ /^\@/ ) { print $_ } }' | java -Xmx12G -jar... (8 Replies)
Discussion started by: jdilts
8 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
DSDP(1) General Commands Manual DSDP(1)
NAME
dsdp5 - semidefinite program solver
SYNOPSIS
dsdp5 [options] filename
maxcut [options] filename
theta filename
DESCRIPTION
This manual page documents briefly the dsdp5, theta and maxcut commands.
dsdp5 -- interface to solve general semi-definite programs
maxcut -- solves a SDP relaxation of the maximum cut problem
theta -- solves the Lovasz thetha problem
OPTIONS
A summary of options is included below. For a complete description, see /usr/share/doc/dsdp-doc.
-help Show summary of options.
-v, --version
Show version of program.
-print print information at each k iteration (default 10)
-save filename of solution file in SDPA format
-fout filename to print standard monitor to a file
-y0 filename for initial solution file
-benchmark
filename to file containing names of SDPA files
-directory
path to directory containing benchmark SDPA files
-suffix
suffix to add to each benchmark problem name
-dloginfo
print more information for higher numbers (default 0)
-dlogsummary
print timing information (default 1 - enabled)
-gaptol
gap tolerance parameter, stop when relative duality gap less than this gap (default 1e-6)
-r0 if nonnegative, initialize S by adding this multiple of the identity matrix (default -1)
-penalty
penalize dual infeasibility (default 1e10)
-boundy
bound for variables y (default 1e7)
-maxit set maximum iterates (default 200)
-zbar Upper bound for dual solution (default 1e10)
-mu0 if positive, set initial barrier parameter (default -1)
-rho Potential parameter as multiple of dimension (default 3)
-drho Use dynamic rho strategy (default 1)
-pnormtol
stop only if pnorm less than (default 1e30)
-reuse Reuse the Schur Matrix this many times (default 4)
-dobjmin
apply a known lower bound for the objective at solution as a constraint.
-bigM if positive, modify algorithm to make dual infeasibility positive with a large associated cost (default 0)
-dloginfo
print more information for higher numbers (default 0)
-params
filename to read selected options from a file
SEE ALSO
glpsol(1),
The programs are documented fully in the accompanying .pdf and html documentation
which can be found in /usr/share/doc/dsdp-doc if the dsdp-doc package is installed.
AUTHOR
dsdp was written by Steven J. Benson <benson@mcs.anl.gov> and Yinyu Ye <yinyu-ye@stanford.edu>
This manual page was written by Soeren Sonnenburg <sonne@debian.org>, for the Debian project (but may be used by others).
August 1, 2007 DSDP(1)