The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Include PERL script with in the unix shell script ganapati UNIX for Dummies Questions & Answers 1 04-29-2008 09:18 AM
Error executing shell command from a perl script voorkey Shell Programming and Scripting 3 02-19-2008 03:37 PM
perl - why is the shell script executed before the print command? mjays Shell Programming and Scripting 3 09-21-2007 02:49 AM
How to Run a shell script from Perl script in Parent shell? hifake Shell Programming and Scripting 16 08-28-2007 05:42 PM
how to write perl substitute command in shell scripts param_it UNIX for Dummies Questions & Answers 3 07-03-2007 01:09 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-05-2005
Registered User
 

Join Date: Sep 2005
Posts: 1
perl command help in shell script

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 anyone help me with this pls.

Thanks,
Venky
Reply With Quote
Forum Sponsor
  #2  
Old 09-05-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
use double quotes
Reply With Quote
  #3  
Old 09-06-2005
Registered User
 

Join Date: Mar 2005
Posts: 29
Code:
[zec#/usr1/zec]: str="hello"
[zec#/usr1/zec]: perl -e "print \"$str\n\""
hello
[zec#/usr1/zec]:
Cheers
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0