Convert bash to simple perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Convert bash to simple perl
# 1  
Old 01-07-2016
Convert bash to simple perl

please delete!

Last edited by SkySmart; 01-13-2016 at 03:14 AM.. Reason: login was completely wrong. going to rewrite in another language
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Covert simple bash script in perl language

Hello, Anyone please covert this in perl language ######################## if ps faux | grep -v grep | grep ProcessXYZ then echo "$SERVICE is running, , everything is fine" exit 0 else echo "$SERVICE is not running" exit 2 fi Additional... (1 Reply)
Discussion started by: fed.linuxgossip
1 Replies

2. Ubuntu

Convert a bash to ash

hello everybody, i'm a beginner in ash and i want to convert this bash script to ash. this script send a xml file to a nagios server : #!/bin/bash PROGNAME=$(basename $0) RELEASE="Revision 0.3" print_release() { echo "$RELEASE" } print_usage() { echo "" echo "$PROGNAME... (6 Replies)
Discussion started by: mdijoux25
6 Replies

3. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

4. Shell Programming and Scripting

HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

Hi all, Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM. Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers. At the moment am... (3 Replies)
Discussion started by: newbie_01
3 Replies

5. Shell Programming and Scripting

Hopefully a simple script, bash or perl...

I'm attempting to parse a file whose contents follow this format; 4:/eula.1028.txt: 8:/eula.1031.txt: 19:/eula.1033.txt: 23:/eula.1036.txt: 27:/eula.1040.txt: 31:/eula.1041.txt: 35:/eula.1042.txt: 39:/eula.2052.txt: 43:/eula.3082.txt: The number of lines of the file... (4 Replies)
Discussion started by: CudaPrime
4 Replies

6. Shell Programming and Scripting

BASH regex (convert from working perl version)

Hi there, I need to test that a variable ($VAR) matches a regex mask in BASH. I have the exact thing working in perl (below), but could somebody advise me how i would do the same in BASH ? do i need to use something like egrep ? #!/bin/perl -w my $VAR = "some value"; if ( $VAR =~... (4 Replies)
Discussion started by: rethink
4 Replies

7. Shell Programming and Scripting

***convert from perl to bash***

can any body translate the follwing script into one that works in bash? #!/usr/bin/perl # classify_books.pl my $csv_file = shift; my %categories = ( 'childrens' => 'childrens_books.txt', 'horror' => 'horror_books.txt', 'sports ' =>... (3 Replies)
Discussion started by: ferrycorsten73
3 Replies

8. Shell Programming and Scripting

Help! Need to convert bash shell to perl

Hello All. I am very new to Linux and I am currently interning. I have been working on a project for 2 weeks now and I have had no success. I have to convert bash shell into perl to decrypt and store files. Here is the code in Linux and Bash. Any help would be greatly appreciated. $... (0 Replies)
Discussion started by: freak
0 Replies

9. UNIX for Dummies Questions & Answers

Intern needing to convert bash to perl.

Hello All. I am very new to Linux and I am currently interning. I have been working on a project for a week and I have had no success. I have to convert bash shell into perl to decrypt and store files. Here is the code in Linux and Bash. Any help would be greatly appreciated. $... (0 Replies)
Discussion started by: freak
0 Replies

10. Shell Programming and Scripting

Convert bash to sh URGENT :(

Hi, I have to write a program to compare 2 files for copying. the program is ran on Solaris 5.8 like this: script.sh file1.txt file2.txt I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I... (2 Replies)
Discussion started by: Chris Jones
2 Replies
Login or Register to Ask a Question
Alien::Package::Rpm(3pm)				User Contributed Perl Documentation				  Alien::Package::Rpm(3pm)

NAME
Alien::Package::Rpm - an object that represents a rpm package DESCRIPTION
This is an object class that represents a rpm package. It is derived from Alien::Package. FIELDS
prefixes Relocatable rpm packages have a prefixes field. METHODS
checkfile Detect rpm files by their extention. install Install a rpm. If RPMINSTALLOPT is set in the environement, the options in it are passed to rpm on its command line. scan Implement the scan method to read a rpm file. unpack Implement the unpack method to unpack a rpm file. This is a little nasty because it has to handle relocatable rpms and has to do a bit of permissions fixing as well. prep Prepare for package building by generating the spec file. cleantree Delete the spec file. build Build a rpm. If RPMBUILDOPT is set in the environement, the options in it are passed to rpm on its command line. An optional parameter, if passed, can be used to specify the program to use to build the rpm. It defaults to rpmbuild. version Set/get version. When retreiving the version, remove any dashes in it. postinst postrm preinst prerm Set/get script fields. When retrieving a value, we have to do some truely sick mangling. Since debian/slackware scripts can be anything -- perl programs or binary files -- and rpm is limited to only shell scripts, we need to encode the files and add a scrap of shell script to make it unextract and run on the fly. When setting a value, we do some mangling too. Rpm maintainer scripts are typically shell scripts, but often lack the leading shebang line. This can confuse dpkg, so add the shebang if it looks like there is no shebang magic already in place. Additionally, it's not uncommon for rpm maintainer scripts to contain bashisms, which can be triggered when they are ran on systems where /bin/sh is not bash. To work around this, the shebang line of the scripts is changed to use bash. Also, if the rpm is relocatable, the script could refer to RPM_INSTALL_PREFIX, which is set by rpm at run time. Deal with this by adding code to the script to set RPM_INSTALL_PREFIX. arch Set/get arch field. When the arch field is set, some sanitizing is done first to convert it to the debian format used internally. When it's retreived it's converted back to rpm form from the internal form. AUTHOR
Joey Hess <joey@kitenet.net> perl v5.12.3 2011-06-11 Alien::Package::Rpm(3pm)