Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Converting shell to Perl I run into shell built in function trap and need alternative in Perl

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 03-22-2017   -   Original Discussion by digioleg54
digioleg54's Unix or Linux Image
digioleg54 digioleg54 is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 29 December 2017, 10:39 AM EST
Posts: 102
Thanks: 17
Thanked 3 Times in 3 Posts
Converting shell to Perl I run into shell built in function trap and need alternative in Perl

I am working on converting shell to Perl script. In shell we have built in function


Code:
 trap

Do you know alternative in Perl or actually we don't need it?

Thanks for contribution
Sponsored Links
    #2  
Old Unix and Linux 03-22-2017   -   Original Discussion by digioleg54
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 22 January 2018, 3:18 PM EST
Location: Foxborough, MA
Posts: 8,204
Thanks: 231
Thanked 786 Times in 733 Posts
I'd start here
The Following User Says Thank You to vgersh99 For This Useful Post:
drl (03-23-2017)
Sponsored Links
    #3  
Old Unix and Linux 03-22-2017   -   Original Discussion by digioleg54
digioleg54's Unix or Linux Image
digioleg54 digioleg54 is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 29 December 2017, 10:39 AM EST
Posts: 102
Thanks: 17
Thanked 3 Times in 3 Posts
I did, but I don't know why shell is using trap. It is clean directories and exit
    #4  
Old Unix and Linux 03-22-2017   -   Original Discussion by digioleg54
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 22 January 2018, 3:18 PM EST
Location: Foxborough, MA
Posts: 8,204
Thanks: 231
Thanked 786 Times in 733 Posts
Quote:
Originally Posted by digioleg54 View Post
I did, but I don't know why shell is using trap. It is clean directories and exit
... or to do whatever 'cleanup' needs to be done (based on the script functionality)
The Following User Says Thank You to vgersh99 For This Useful Post:
digioleg54 (03-22-2017)
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl newbie_01 Shell Programming and Scripting 3 11-06-2011 01:26 AM
Shell script calling Perl function, sort and find data, write to new files kowit010 Homework & Coursework Questions 6 11-02-2011 10:39 PM
Perl - pass shell-vars into perl for input loop alex_5161 Shell Programming and Scripting 4 03-19-2010 03:11 PM
Converting Perl code to shell zainravi Shell Programming and Scripting 8 03-12-2009 01:54 PM
Converting bash shell to perl freak UNIX for Dummies Questions & Answers 4 05-29-2008 01:35 AM



All times are GMT -4. The time now is 11:59 AM.