Sponsored Content
Top Forums Shell Programming and Scripting Passing a file handler and an array from Perl to Shell Script Post 302259319 by pinkgladiator on Monday 17th of November 2008 10:00:05 PM
Old 11-17-2008
Strange! I used the following script to see how many lines of code I have, and it says 1, but I have two lines of code.

a=0
while read line
do a=$(($a+1));
echo $a;
done < "/home/.../emailFile.txt"
echo "Final line count is: $a";
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script signal handler

AIX 4.3.3 I am trying to write a signal handler into a ksh shell script. I would like to capture the SIGTERM, SIGINT, and the SIGTSTP signals, print out a message to the terminal, and continue executing the script. I have found a way to block the signals: #! /bin/ksh SIGTERM=15 SIGINT=2... (2 Replies)
Discussion started by: jalburger
2 Replies

2. Shell Programming and Scripting

Passing value from shell script to .pls file

I have a shell script which takes at the command prompt options like ss1.sh -F SCOTT -T JOHN F- From User T- To User I want to pass the From User(SCOTT) Value to another script ss2.pls (This script runs a PL/SQL Program). Depending on the FromUser value in the ss1.sh script i have to... (4 Replies)
Discussion started by: dreams5617
4 Replies

3. Shell Programming and Scripting

Need help passing variables in shell script to perl one-liner

I'm writing a script to automate some post-install tasks on RHEL4 servers. I need the following code to insert an 'A' in the middle of a string, then replace the string in a file. I know I can use sed to do this, but I'd like to use perl's in place edit so I don't have to write to a temp file,... (1 Reply)
Discussion started by: Xek
1 Replies

4. Shell Programming and Scripting

Passing parameter from one file to shell script

Hi All, I have a 2 files. File1 i am generating using an ETL tool, which is a comman seperated delimited file which contains country code & load date. everytime, this country code will be updated from a table. It might be AB or BA & ld_date will be for which date we need to load the file. ... (7 Replies)
Discussion started by: Amit.Sagpariya
7 Replies

5. Shell Programming and Scripting

Perl Function Array Arguement Passing

Hi All, I have some questions regarding array arguements passing for Perl Function. If @array contains 2 items , arguements passing would be like Code_A. But what if @array needs to add in more items, the rest of the code like $_ will have to be modified as well (highlighted in red), which is... (5 Replies)
Discussion started by: Raynon
5 Replies

6. Shell Programming and Scripting

Can we pass an array of strings from a Perl Program to a Shell Script?

Hi Folks, The subject is my question: Can we pass an array of strings from a Perl Program to a Shell Script? Please provide some sample code. Thanks ---------- Post updated at 11:52 PM ---------- Previous update was at 11:43 PM ---------- I got it. Its here:... (0 Replies)
Discussion started by: som.nitk
0 Replies

7. 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

8. Shell Programming and Scripting

Passing Shell array to SQLPlus

Dears, Newbie here and tried to search this topic for 3 days now with results. I have a shell array and I want to use it in sqlplus with one connection. here is what I have for now #!/bin/ksh FileName=1000 FileName=2000 FileName=3000 FileName=4000 sqlplus /nolog <<EOF connect... (20 Replies)
Discussion started by: roby2411
20 Replies

9. Shell Programming and Scripting

Passing PERL var values to SH Shell Script

Greetings all, If I have a SH script that calls a PERL script in the following way: perl $HOME/scripts/config.properties And in the config.properties PERL file, this Perl script only sets a number of environmental parameters in the following way: #!/usr/bin/perl $VAR1 = ( ... (3 Replies)
Discussion started by: gikyo12
3 Replies

10. Shell Programming and Scripting

Passing values to an XML file from shell script

:wall: Hi, I have an XML file with 5 tags. I need to pass values to the XML file from a shell script that will replace values in 2 of the tags. I cannot hardcode the tag values in XML and use replace command in script as the values are likely to change. Please help !!!!!!!!!!! (2 Replies)
Discussion started by: Monalisaa
2 Replies
JAVA2HTML(1)						      General Commands Manual						      JAVA2HTML(1)

NAME
java2html - generates highlighted html-files from Java or C++ source SYNOPSIS
java2html [options] [filename...] DESCRIPTION
This manual page documents how to use java2html. If no arguments are given on the command line of java2html, it reads from stdin and writes to stdout. If invoked with filenames as arguments java2html will write it's output into new files. Names of output files are generated by appending ".html" to the corresponding input filename. Installing as a CGI program java2html can be installed as a CGI program and convert source files on the fly. In order to set this up for apache the webmaster has to add the two lines AddType text/x-java .java Action text/x-java /cgi-bin/java2html to the webserver configuration file. java2html depends on the webserver properly setting environment variable PATH_TRANSLATED to the path- name of the source file. If java2html has been compiled with option -DCOMPRESSION=1 then it will invoke gzip to compress the generated HTML before sending it to the requesting browser. Of course java2html takes care to check if the browser accepts gzip encoding. OPTIONS -- Interpret all following arguments on the command line as filenames. This is useful, if you want to convert files beginning with a '-'. -b filename Insert the file 'filename' after converted data and before HTML footer. See also the -s option. -c Turns off CGI-script detection and HTTP header generation. This is needed to use java2html as a subcommand in another CGI script. -h filename Insert the file 'filename' after the HTML headers and before the converted data. See also the -s option. -i Generate an index only. This will generate a list of references (HREF's) to the labels that java2html creates for your source file. The references are created as list items (<li>) in an HTML list. Each line has the form <li><a href="#name">prototype()</a></li> so they can be used directly as an index list, or further parsed by another script. If you want the index at the top of the source file, you will need a wrapper script like this one: #! /bin/sh echo "Content-type: text/html" echo "" echo "<html>" echo "<head><title>$PATH_TRANSLATED</title>" echo "<meta name="generator"" echo "content="`java2html -V`">" echo "</head>" echo "<body>" echo "<h1>Source of $PATH_TRANSLATED</h1>" echo "<ul>Structures and functions" cat $PATH_TRANSLATED | java2html -isc echo "</ul>" echo "<hr></hr>" cat $PATH_TRANSLATED | java2html -sc echo "</body></html>" exit -n Number lines and label them with 'line' followed by the line number. Empty lines get no label, but the linecounter will count them nevertheless. With this feature you can refer to special lines of code from other parts of the generated file or from external files with a line like this: <A HREF="foo.java.html#line301">Go to line 301</A> -s With this option you can suppress the generation of HTML headers. This is especially useful together with options -b file and -h file. -t title Set the title to 'title'. The default is the filename you converted or "stdin" if reading from stdin. This option is only used if -s is not set. -u Print usage information. -w width sets the WIDTH attribute for HTML tag <PRE>. If this option is not used a default of 80 is assumed. (Currently most browsers are ignoring this attribute). -V reports the version number of java2html. EXIT STATUS
java2html returns 0 on success, 1 if input files are not existing/readable, 2 if output files are not creatable/writable, 3 if invoked with illegal options and 4 if gzip cannot be invoked. AUTHORS
Florian Schintke <schintke@cs.tu-berlin.de> Martin Kammerhofer <mkamm@gmx.net> wrote the CGI feature. Rob Ewan <rob@ewan.com> wrote the indexing feature. SEE ALSO
c2html(1), pas2html(1), perl2html(1). JAVA2HTML(1)
All times are GMT -4. The time now is 08:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy