Sponsored Content
Full Discussion: Perl command error
Top Forums Shell Programming and Scripting Perl command error Post 302926176 by Corona688 on Friday 21st of November 2014 03:34:18 PM
Old 11-21-2014
Quote:
Originally Posted by cmccabe
I am trying to use VB in excel to call and execute the .sh file
For the third time -- it is not an sh file. You should be running it in perl because it is perl and not shell.

Running it in shell instead of perl will cause the problems you have seen, because the shell does not understand the perl code when running it in shell instead of perl.

The way to run it is to use perl instead of shell, so it runs using perl, which understands perl programs.

... mintty.exe perl script.sh
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Script Error with find command

Guys, I need to find all the files ending with either dmp or dmp.Z. This command is giving me error. @files =`find $path \(-name "*.dmp" -o -name "*.dmp.Z"\) -mtime +30`; sh: 0403-057 Syntax error at line 1 : `(' is not expected. Thanks in advance (4 Replies)
Discussion started by: MKNENI
4 Replies

2. Shell Programming and Scripting

[Perl] Accessing array elements within a sed command in Perl script

I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows: $count = 0; while ( $count < $#test ) { `sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`; `cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies

3. Shell Programming and Scripting

Error executing shell command from a perl script

Hi Gurus, I've a find command that gets the list of files from a source directory where the extension is not html, xml, jsp, shtml or htaccess. The below find command runs fine from the command prompt or in a shell script. I need to eventually run it in a PERL script and am getting the... (5 Replies)
Discussion started by: voorkey
5 Replies

4. Shell Programming and Scripting

combine two perl lines into a single perl command

Hi Everyone, i have a string 00:44:40 so: $tmp=~ s/://gi; $tmp=~s/({2})({2})({2})/$1*3600+$2*60+$3/e; the output is 2680. Any way to combine this two lines into a single line? Thanks (4 Replies)
Discussion started by: jimmy_y
4 Replies

5. Shell Programming and Scripting

Convert Sed command to perl command

Hello, Can any perl experts help me convert my sed string to perl. I am unsuccessful with this. I have to remove this string from html files OAS_AD('Top'); I have come up with this. However the requirement is in perl. for find in $(find . -type f -name "file1.html") ; do cat $find |... (2 Replies)
Discussion started by: abacus
2 Replies

6. Shell Programming and Scripting

Perl command error...

Good morning! Imtrying to run: #!/usr/bin/perl perl -nle 'print if /\var\/log/' /etc/syslog.confBut I keep getting error: Do you need to predeclare -nle.Im trying to create a script that read the contents of /etc/syslog.conf and print out every line that contains /var/log. (1 Reply)
Discussion started by: bigben1220
1 Replies

7. Shell Programming and Scripting

Perl & Sed command -- Out of Memory Error

Experts, We used to receive our source files with '~^' as row delimiter. This file contains 2500K records and two of the columns having value in HTML formats within the file. While running the below commands against the file, we are encountering out of memory, could you please help to... (3 Replies)
Discussion started by: srivijay81
3 Replies

8. Shell Programming and Scripting

perl/unix: script in command line works but not in perl

so in unix this command works works and shows me a list of directories find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt but when i try running a perl script to run this command my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies

9. Shell Programming and Scripting

Perl error in batch command but works one at a time

In the below perl executes if one file is processed perfect. However, when multiple files are processed in batch which is preferred I get the below error that I can not seem to fix it as the '' necessary for the command to execute, but seem to only work for one -arg option. Thank you :). ... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. AIX

Perl error : perl: warning: Setting locale failed.

This's my problem perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = "en_US.UTF-8", LC__FASTMSG = "true", LC_MESSAGES = "", LC_CTYPE = "en_US.UTF-8", LC_TYPE = "en_US.UTF-8", LANG = "EN_US"... (1 Reply)
Discussion started by: bobochacha29
1 Replies
GL-117(6)							  gl-117 overview							 GL-117(6)

NAME
gl-117 - an OpenGL action flight simulator SYNOPSIS
gl-117 [-dlevel -h -v] DESCRIPTION
gl-117 is an OpenGL and SDL based action flight simulator written in ISO C++. Enter the Eagle Squadron and succeed in several challanging missions leading though different landscapes. Five predefined levels of video quality and an amount of viewing ranges let you perfectly adjust the game to the performance of your system. The game provides joystick and mouse support, sound effects, and music. OPTIONS
-dlevel Set the debug level to level in [0..5]. '0' means quiet and will avoid any output, '1' will log fatal errors causing the program to crash on stderr, '2' will also print exceptions on stderr, '3' will add warnings on stdout, '4' prints additional information (pre- defined) on stdout, and '5' gives developer specific messages on stdout. -h Print a short summary on stdout and then quit immediately. -v Display the version number of gl-117 and then quit immediately. CONFIGURATION
gl-117 uses a predefined working directory ".gl-117" in the user's home directory to load and store all savegame files and read the plain text configuration files "conf" and "conf.interface". If there are no config files available, gl-117 will create them using standard set- tings. The contents of the files are quite self-explanatory. DOCUMENTATION
Please look at the gl-117 user manual (gl-117.pdf) for installation instructions and further gameplay related descriptions. COPYRIGHT
gl-117 is distributed under the terms of the GPL. AUTHORS
Thomas A. Drexl (tom.drexl@gmx.de) 27 February 2003 GL-117(6)
All times are GMT -4. The time now is 04:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy