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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl script to invoke Cold Backups northern1969 Shell Programming and Scripting 3 11-03-2008 12:04 AM
perl-like split function for bash? eur0dad Shell Programming and Scripting 5 09-05-2008 07:23 PM
passing variable from bash to perl from bash script arsidh Shell Programming and Scripting 10 06-04-2008 01:25 PM
How to invoke a perl script from java program grajesh_955 Shell Programming and Scripting 4 02-21-2008 10:42 AM
Invoke perl program from Ksh mahalakshmi Shell Programming and Scripting 10 12-19-2006 08:46 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-12-2008
NewDeb NewDeb is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 5
Invoke Perl function from Bash ?

Is it possible to invoke a perl function from a bash script ?

There are existing perl scripts with many functions that I want to reuse from a more recent script written in bash. Hence the question.
  #2 (permalink)  
Old 11-13-2008
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,323
as in : form the shell script you have (e.g.) :
echo "Test for shell script"
# and then :
if (1 != 0) {warn "didn't work\n"};
Well, it's not going to work. You should rather write in perl and call systems functions as shell commands whenever needed, with either system() or using backticks, as in : `pgrep test-process` ; # just an example.
Closed Thread

Bookmarks

Tags
bash, perl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:52 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0