Can you run a unix script from a perl program


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can you run a unix script from a perl program
# 8  
Old 08-24-2009
tried running it straigth from the prompt without the fullstop
awk: syntax error near line 5
awk: illegal statement near line 5
with the fullstop
ksh: syntax error: `(' unexpected
# 9  
Old 08-24-2009
Quote:
Originally Posted by dwightja
tried running it straigth from the prompt without the fullstop
awk: syntax error near line 5
awk: illegal statement near line 5
with the fullstop
ksh: syntax error: `(' unexpected
what's the 'fullstop'?
Without seeing the ksh script you're executing, it's impossible to help you further.
Post the script you're executing using code tags.
# 10  
Old 08-24-2009
see scripts attached
i was just trying to test fadditional lines in the perl script
reformat .sh reformats the file customerdata.txt
all files are in the same folder and have executable permissions
after i get the test.pl to work
i am going to try and integrate it into the bpformatter.txt
above the open( my $in, $self->{FILENAME} ) or $halt = 1;

really and truly what has occured is that i wanted to do the changes in NWCformatter
in that each record now actullay contains two records
this is why i initially created the reformatnwc.sh
as i did not know how to accomplish this in the nwcformatter perl script
as it seems that script can only return 1 record
# 11  
Old 08-24-2009
if you're under Sun/Solaris, try using '/usr/bin/nawk' or '/usr/xpg4/bin/awk' instead of plain/old/buggy 'awk' (in your reformatnwc.sh).
# 12  
Old 08-24-2009
ill try that but just to note the reformatnwc.sh is working
when i execute it by itself
its when i try and run it from the perl command that it fails
# 13  
Old 09-07-2009
turns out perl environment had changed so was referring to a library location that didnt exist
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Shell Programming and Scripting

Perl program to run a Shell script issues...

Hi all, I have the following Perl script which is intended to run a Shell script and generate some logging for the purposes of tracking weather or not the script ran. I get an error, of course, since I don't know what I'm doing really. Here is the code: #!/opt/perl/bin/perl -w ... (14 Replies)
Discussion started by: zixzix01
14 Replies

3. Shell Programming and Scripting

count number of entries perl program or Unix script

Hi I have a file with number of entries name 1 123 name 1 345 name 1 65346 name2 3243 name2 24234 name 2 234234 so on ......... how to count total number of entries for name 1 and name2...and so on Please guide. (1 Reply)
Discussion started by: manigrover
1 Replies

4. Shell Programming and Scripting

Run perl script from Unix script

Hello Guys I have to run a perl script from unix one The reason for this is I have to connect to remote server and then execute the perl script. In unix script I am able to connect to remote server without any password via ssh ssh -o 'PasswordAuthentication yes' -o... (5 Replies)
Discussion started by: Pratik4891
5 Replies

5. Homework & Coursework Questions

Run Program from Bash CGI-Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: This is a problem I am having with my 2 semester senior project. I have a LAMP server running Ubuntu 9.10 with... (8 Replies)
Discussion started by: JMooney5115
8 Replies

6. Shell Programming and Scripting

How to process and run a program in the background in perl?

Hi, I have a query about processing and running Perl program at the background. I have HTML file called Userform.html which accepts input from the user. As soon as input is given the contol goes to get.cgi (get.cgi does some processing and computing tasks). Actually get .cgi takes more... (0 Replies)
Discussion started by: vanitham
0 Replies

7. Shell Programming and Scripting

Run shell program in perl

Hello , I want to run some shell scripts in my perl script. I need to read the script's name from a file ( this file includes the name of all the scripts) and run the script one by one.. Please let me know how to go .. Thanks in advance, Radha (5 Replies)
Discussion started by: s123.radha
5 Replies

8. Shell Programming and Scripting

want to run different files under the same program using shell script

suppose have different files 1.1 2.2 3.3 4.4 5.5 All the files have to run under the same command say tr -d '\n' so how to run all the files under the same command by using shell script (3 Replies)
Discussion started by: cdfd123
3 Replies

9. UNIX for Dummies Questions & Answers

How do i run a program while in Unix?....

Im new and wanted to know if im in the unix terminal and lets say i want to run microsoft word for example. i go in and go into the HD and then keep going and i type ls and see that microsoft word.app is there. how do i run it from that? (4 Replies)
Discussion started by: Corrail
4 Replies

10. Shell Programming and Scripting

possible to run script to enter info within a program?

hi, I am new to Unix and script writing so I was wondering if this would be possible and how I might do it. I've learned to write a basic script and the first step I need to do is to open a program (for genetic linkage). The program then requires me to enter a lot of information. Sort of line... (1 Reply)
Discussion started by: lianderthal
1 Replies
Login or Register to Ask a Question