Sponsored Content
Top Forums Shell Programming and Scripting Converting Perl code to shell Post 302293803 by zainravi on Wednesday 4th of March 2009 12:00:59 AM
Old 03-04-2009
Could please advise if had a chance to look at this?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting bash shell to perl

Does anyone know how to convert this bash shell script to perl? for i in `ls -l *pgp` do `usr/bin/gpg --passphrase-fd 0 $i < .sunspot` done Thanks! Any help would be appreciated. I'm new to Linux and perl. (4 Replies)
Discussion started by: freak
4 Replies

2. Shell Programming and Scripting

Refrence Shell variable in Perl code.

:confused: I have 2 files a & b Contents of a are:- -------------------------- This is a Good Boy This is a Good Boy This is a Very Good Boy This is a Good Boy This is a Good Boy --------------------------- The contents of b are ------------------- This is Testing Beta... (5 Replies)
Discussion started by: send2sridhar
5 Replies

3. Shell Programming and Scripting

How to run perl code within a shell script...?

Hi, I have a sheel script that invokes a perl script...Now, instead havin the perl script as a separate file I'd like put the contents in the sheel script itself...But I am not sure how ro run that perl script contents.please help me Thanks (1 Reply)
Discussion started by: vijay_0209
1 Replies

4. Shell Programming and Scripting

Converting perl to exe

Hello All, I want to convert .pl to .exe with all include libraries like: WIN32/OLE..... Please suggest me how i will proceed for this.... (7 Replies)
Discussion started by: suvenduperl
7 Replies

5. Shell Programming and Scripting

convert perl code to shell script

This is about how to Monitoring folder for new files using shell script im doing a project using smsserver tools 3. i have used a perl script to handle incoming messages. the content of each message must be directed to a java program. this program generates the answer to reply to the user... (2 Replies)
Discussion started by: x34
2 Replies

6. Shell Programming and Scripting

Perl:: mass replacement of converting C code formats to tgmath.h

hello, i have a lot of C old code I'm updating to C11 with tgmath.h for generic math. the old code has very specific types, real and complex, like cabsl, csinhl, etc usually for simple bulk replacements i would do something simple like this perl -pi -e 's/cosl/cos/g' *.c the reference... (0 Replies)
Discussion started by: f77hack
0 Replies

7. Shell Programming and Scripting

Need shell script version of below perl code

We are using AIX version 7100-03-05-1524 Please provide shell script version (bash or ksh) of below perl code,since we need to have line breaks in huge XML files #!/usr/bin/perl # # Purpose: Read an XML file and indent it for ease of reading # Author: RedGrittyBrick 2011. # Licence:... (11 Replies)
Discussion started by: vishwanath001
11 Replies

8. Shell Programming and Scripting

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 trap Do you know alternative in Perl or actually we don't need it? Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies

9. UNIX for Beginners Questions & Answers

Converting awk to perl

Hello. I'm trying to convert an awk script I wrote to perl (which I just started self-teaching). I tried the a2p command but I couldn't make sense of most of it. Here was the awk code: BEGIN{ FS = "," print "NAME\tLOW\tHIGH\tAVERAGE" a=0 } { if(a==0){ a+=1 (1 Reply)
Discussion started by: Eric7giants
1 Replies

10. UNIX for Beginners Questions & Answers

Converting awk to perl

Hello. I'm currently teaching myself Perl and was trying to turn an awk code that I had written into Perl. I have gotten stuck on a particular part and a2p has not helped me at all. The task was to take a .csv file containing a name, assignment type, score and points possible and compute it into a... (1 Reply)
Discussion started by: Eric7giants
1 Replies
JE::Code(3pm)						User Contributed Perl Documentation					     JE::Code(3pm)

NAME
JE::Code - ECMAScript parser and code executor for JE SYNOPSIS
use JE; $j = new JE; $code = $j->compile('1+1'); # returns a JE::Code object $code->execute; METHODS
$code->execute($this, $scope, $code_type); The "execute" method of a parse tree executes it. All the arguments are optional. The first argument will be the 'this' value of the execution context. The global object will be used if it is omitted or undef. The second argument is the scope chain. A scope chain containing just the global object will be used if it is omitted or undef. The third arg indicates the type of code. 0 or undef indicates global code. 1 means eval code (code called by JavaScript's "eval" function, which has nothing to do with JE's "eval" method, which runs global code). Variables created with "var" and function declarations inside eval code can be deleted, whereas such variables in global or function code cannot. A value of 2 means function code, which requires an explicit "return" statement for a value to be returned. If an error occurs, "undef" will be returned and $@ will contain the error message. If no error occurs, $@ will be a null string. $code->set_global( $thing ) You can transfer a JE::Code object to another JavaScript environment by setting the global object this way. You can also set it to "undef", if, for instance, you want to serialise the compiled code without serialising the entire JS environment. If you do that, you'll need to set the global object again before you can use the code object. FUNCTIONS
JE::Code::add_line_number($message, $code_object, $position) WARNING: The parameter list is still subject to change. This routine append a string such as 'at file, line 76.' to the error message passed to it, unless it ends with a line break already. $code_object is a code object as returned by JE's or JE::Parser's "parse" method. If it is omitted, the current value of $JE::Code::code will be used (this is set while JS code is running). If $JE::Code::code turns out to be undefined, then $message will be returned unchanged (this is subject to change; later I might make it use Carp to add a Perl file and line number). $position is the position within the source code, which will be used to determine the line number. If this is omitted, $JE::Code::pos will be used. EXPORTS
"add_line_number" can optionally be exported. SEE ALSO
JE perl v5.14.2 2012-03-18 JE::Code(3pm)
All times are GMT -4. The time now is 06:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy