Sponsored Content
Top Forums Shell Programming and Scripting usage of echo with standard input Post 302251527 by wempy on Monday 27th of October 2008 10:40:59 AM
Old 10-27-2008
It appears that you want the contents of file name to be the stdin of the program (the < redirects the stdin of program and feeds the contents of the file into it), and you also want the name of the file to be a parameter available in program.

assuming that program expects a filename as the first parameter then
Code:
program filename <filename

should achieve what you want
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

standard input

how can i redirect standard input? i dont remember :/, though could you redirec not from a command? i mean, to redirect always stdin and stout (1 Reply)
Discussion started by: Jariya
1 Replies

2. Shell Programming and Scripting

How to copy from standard input

I tried copy the output files from find command into a directory. Example, find / -name core 2>/dev/null | xargs cp???? I have known that we can use xargs to execute command lines from standard input but how to use it in this case. Or I can do something besides xargs. (2 Replies)
Discussion started by: lalelle
2 Replies

3. Shell Programming and Scripting

change standard input ?

Dear... I have a scrpit that contains multiple read command.... when I run the script I have to enter 3 variables so that I can get the output.. but, I dont want to put those 3 inputs manually every time... I want to make a shell that reads the 3 inputs from a file. the script name is... (4 Replies)
Discussion started by: yahyaaa
4 Replies

4. Shell Programming and Scripting

Command Output to Standard Input

Hi All, How do I provide the output of a command to another command which is waiting for an input from the user ? Ex : I need to login to a device via telnet. In the script, initially I use the "read" command to get the IP Address, Username and Password of the device from the user. Now,... (1 Reply)
Discussion started by: sushant172
1 Replies

5. Solaris

standard input

Please give me any example for standard input in Solaris. (6 Replies)
Discussion started by: karman0931
6 Replies

6. Shell Programming and Scripting

Send data to standard input

Hello, I'm writting a korn script that executes a daemon in a remote server. The problem is that daemon doesn't go background until it receives an enter from the standard input, and it maintains the rsh opened until it get it. I'm looking for the best (efficient and elegant) way to do send the... (3 Replies)
Discussion started by: nefeli
3 Replies

7. Shell Programming and Scripting

Reading Standard Input

Hello, I am new to scripting. How do I read multiple lines from the command line? I know read reads one line, but if I have to read multiple lines, how should I do? Thanks, Prasanna (4 Replies)
Discussion started by: prasanna1157
4 Replies

8. Shell Programming and Scripting

Reading from standard input

So, I am new to shell scripting and have a few problems. I know how to read from standard input but I do not know how to really compare it to say, a character. I am trying to compare it to a character and anything exceeding just a character, the user will get an output message, but the program... (7 Replies)
Discussion started by: Bungkai
7 Replies

9. Shell Programming and Scripting

standard input and cron

I have a program that requires the user to enter input values while it is being run for example in bash ... ... .. echo "Enter your input" read input echo $input ... ... ...I need to schedule this program with crontab, hence a problem, cronjobs run in the background, any ideas on how to... (10 Replies)
Discussion started by: walforum
10 Replies

10. Homework & Coursework Questions

Removing punctuations from file input or standard input

Just started learning Unix and received my first assignment recently. We haven't learned many commands and honestly, I'm stumped. I'd like to receive assistance/guidance/hints. 1. The problem statement, all variables and given/known data: How do I write a shell script that takes in a file or... (4 Replies)
Discussion started by: fozilla
4 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:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy