Sponsored Content
Top Forums Shell Programming and Scripting Error executing shell command from a perl script Post 302168679 by voorkey on Tuesday 19th of February 2008 06:31:24 AM
Old 02-19-2008
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 following error when run from perl script.

`find <Source-dir-path> ! \( -name '*.html' -o -name '*.xml' -o -name '*.jsp' -o -name '*.shtml' -o -name '*.htaccess' \) -type f -print`;

sh: syntax error at line 1 : `(' unexpected

Running out of fuel and would appreciate any help or suggestions to make this work.

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error executing shell script in Linux

Hi, I have following shell script code : ------------------------------------------------------------------ #!/bin/bash SCRIPTS_DIR="/scriptsDir1" # tables login/password APIL_USER="uname/pswd" I2_USER="uname/pswd" # Database DB="db1" cd "$SCRIPTS_DIR/scriptsDir2" sqlplus... (2 Replies)
Discussion started by: Chaitrali
2 Replies

2. Shell Programming and Scripting

Problem Executing Firmware Command using Shell Script

Guys, I have a script that should change one of the configuration Parameter in a http accelerator, this config change which will halt http traffic into device. So I have designed a script which should do these changes. But after executing this script, found that one of the input variable is not... (8 Replies)
Discussion started by: raghunsi
8 Replies

3. Shell Programming and Scripting

executing command in a remote machine through ssh - shell script

Hi All, i have two machines like x and y . my requirement is i should connect to machine Y from x through ssh connection . and do some operation such as copy and move and delete files in Y machine . i tried with this code but it is doing in machine x only . and i need to exit from Y when... (1 Reply)
Discussion started by: rateeshkumar
1 Replies

4. Programming

Executing a awk command inside perl script --

Hello experts I want to execute a awk command, which reads from txt files and sums the numbers from the first column for those listed only inside a <init> block -- The awk command is like awk '/<\/?init>/{x = !x}x{a++}x && a > 2{sum+=$1}END{printf"%E" "\n", sum} So, I want to execute... (2 Replies)
Discussion started by: Alkass
2 Replies

5. Shell Programming and Scripting

Error in executing Perl script

Hello All I am facing an issue The unix script is running fine in unix environment which uses ssh connection but when I try to run the same in informatica environment (same server where I was running the unix script manually successfully) its showing the below error command-line line 0:... (11 Replies)
Discussion started by: Pratik4891
11 Replies

6. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

7. UNIX for Dummies Questions & Answers

Cron shell script not executing diskutil command

I'm trying to learn how to use cron for repetative tasks. I have an external disk that needs to be unmounted and remounted every hour due to some problems that a backup utility (specifically, TimeMachine) is having repeatedly accessing the device. I've created a shell script that will find the... (3 Replies)
Discussion started by: illuminate
3 Replies

8. Shell Programming and Scripting

Executing perl script in Linux gives :Exec format error. Wrong Architecture

i have perl script that used to be working great , once i edit it in windows and convert it to UTF-8 and then via FTP return it . also did: chmod +x foo.pl and then when i try to run it : ./foo.pl im getting this error: ./foo.pl: Exec format error. Wrong Architecture.... (4 Replies)
Discussion started by: umen
4 Replies

9. Shell Programming and Scripting

Executing 'exit' command from shell script

Hi, I am writing shell script to automate few use cases for CLI interface. We have CLI interface which has bunch of commands. I am trying to execute one of the commands 'exit' as part of automation to exit from CLI object (not from shell script) in my shell script. My intension is to execute... (4 Replies)
Discussion started by: Mahesh Desai
4 Replies

10. Shell Programming and Scripting

Error while executing the shell script

Hi Gurus, The following script fails with the error 'command not found' while trying to execute. As the error indicates, the script fails at ROW#30 where the EOF is defined for SQL statement. It appears that the script is trying execute the lines in the SQL output written to ta spool file.... (7 Replies)
Discussion started by: svajhala
7 Replies
jspc(1M)						    Application Server Utility							  jspc(1M)

NAME
jspc - precompiles JSP source files into servlets SYNOPSIS
jspc [options]jsp_filesor jspc [options]-webapp dir Use the jspc command to compile your JSP 1.2 compliant source files into servlets. To allow the application server to pick up the precom- piled JSPs from a JAR file, you must disable dynamic reloading of JSPs. To do this, set reload-interval property to -1 in the jsp-config element of the sun-web.xml file. For more information about the sun-web.xml file, see the Sun ONE Application Server Developer's Guide. jsp_files one or more JSP files to be compiled. -webapp dir a directory containing a web application. All JSPs in the directory and its subdirectories are compiled. You cannot specify a WAR, JAR, or ZIP file; you must first deploy it to an open directory structure using asadmin deploy. -q enables quiet mode (same as -v0). Only fatal error messages are displayed. -d dir the output directory for the compiled JSPs. Package directories are automatically generated based on the directo- ries containing the uncompiled JSPs. The default top-level directory is the directory from which jspc is invoked. -p name the name of the target package for all specified JSPs, overriding the default package generation performed by the -d option. -c name the target class name of the first JSP compiled. Subsequent JSPs are unaffected. -uribase dir the URI directory to which compilations are relative. Applies only to JSP files listed in the command, and not to JSP files specified with -webapp option. This is the location of each JSP file relative to the uriroot. If this cannot be determined, the default is /. -uriroot dir the root directory against which URI files are resolved. Applies only to JSP files listed in the command, and not to JSP files specified with -webapp option. If this option is not specified, all parent directories of the first JSP page are searched for a WEB-INF subdirectory. The closest directory to the JSP page that has one is used. If none of the JSP's parent directories have a WEB-INF subdirectory, the directory from which jspc is invoked is used. -genclass compiles the generated servlets into class files. -v [level] enables verbose mode. The level is optional; the default is 2. Possible level values are: o 0 - fatal error messages only o 1 - error messages only o 2 - error and warning messages only o 3 - error, warning, and informational messages o 4 - error, warning, informational, and debugging messages -mapped generates separate write calls for each HTML line and comments that describe the location of each line in the JSP file. By default, all adjacent write calls are combined and no location comments are generated. -die [code] causes the JVM to exit and generates an error return code if a fatal error occurs. If the code is absent or unparsable it defaults to 1. -webinc file creates partial servlet mappings for the -webapp option, which can be pasted into a web.xml file. -webxml file creates an entire web.xml file for the -webapp option. -ieplugin class_id specifies the Java plugin COM class ID for Internet Explorer. Used by the jsp:plugin tags. EXAMPLES
Example 1: Using jspc to compile the JSPs in a web application The following command compiles a set of JSP files into Java files under Hellodir: jspc -d Hellodir welcome.jsp shop.jsp checkout.jsp The following command compiles all the JSP files in the specified webapp into class files under Hellodir: jspc --d Hellodir --genclass --webapp /path_to_webapp_directory To use these precompiled JSP in the web application, put the generated files under Hellodir into a JAR file, place the JAR file under WEB- INF/lib and set reload-interval property to --1 in the jsp-config element of the WEB-INF/sun-web.xml file. asadmin(1M) Sun Java System Application Server March 2004 jspc(1M)
All times are GMT -4. The time now is 02:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy