Sponsored Content
Top Forums Shell Programming and Scripting How to give runtime arguments to different program Post 302467114 by Chubler_XL on Thursday 28th of October 2010 09:42:13 AM
Old 10-28-2010
You could have the commands in an input file and redirect them to the program:

Code:
./dictool < inputfile

Have them straight in your script:

Code:
./dictool <<EOF
command1
command2
command3
EOF

Or pipe output of echo to your program:

Code:
echo "command1
command2
command3" | ./dictool

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reading runtime arguments from a file

Hi All, I am running a script which wud take a long time to complete execution ... In between, it asks for yes/no sort of confirmation from user for doing some acivities .... Now that I dont want to wait till the script executes upto this point where it needs user confirmation, is there any way... (4 Replies)
Discussion started by: Sabari Nath S
4 Replies

2. HP-UX

get program name give a process id

Hi , I have query regarding to get a program name given a pid in HP-Ux . give procees id ( PID) i would like to retrieve the process/program through a C program ? my input to c program will be will be pid and i would like to know what is process name /program name . Many Thanks ... (1 Reply)
Discussion started by: naren_chella
1 Replies

3. Shell Programming and Scripting

passing runtime arguments to a shell script...

hi I am new to shell programming.....my question is while running one of my shell program it stops in between to accept input from the user and proceeds furthur after giving input....I want to know whether I can set this input through some files so that the shell acript reads the input from the... (10 Replies)
Discussion started by: santy
10 Replies

4. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

Hi, I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime. To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies

5. Programming

Runtime error in C++ Program - Help

All, I am getting this when i try to ran a program in HP unix. Things i came across 1. i have a system HP-UNIX where this same exe is working. 2. We have set a new HP_UNIX with the same configration and copied the exe to the new system we are getting this error. 3. Only... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

6. Programming

Please give me some advise to program for unix/linux using c/c++?

I have a good foundation of c++.I want to learn to program for linux/unix,can you give me some advises,for example classic books ,which operating system is used better(freebsd,solaris,federal linux.etc),and which aspects uses mostly in job.Can you give me clear direction for working or learning. (1 Reply)
Discussion started by: fengshuiyue
1 Replies

7. Shell Programming and Scripting

Passing arguments at runtime

Hi .. Can any one please tell how to pass argument to shell script at runtime? I want to implement funcnality just like bc, where we can provide input while script is running and can be used later in the same script. Thanks in advance... (1 Reply)
Discussion started by: kunjalhg
1 Replies

8. Programming

Help... runtime error in my maxheap sort program

#include<iostream> using namespace std; int *a,size,heapsize; void maxheap(int *a,int j) { int l,r,largest,temp; l=2*j; r=(2*j)+1; for(j=0;j<size;++j) { if(l<=heapsize && a>a) largest=l; else largest=j; if(r<=heapsize... (5 Replies)
Discussion started by: poonam.gaigole
5 Replies

9. Shell Programming and Scripting

Multiple runtime arguments

I am passing 3 runtime arguments to a shell script $path crtl1 crtl2 the crtl files contains data(filename|date|count) filename.txt|02/05/2010|10 The path contains the original data file,the code should fetch (filename|date|count) from original data file and it should match... (7 Replies)
Discussion started by: Prashanth B
7 Replies

10. Shell Programming and Scripting

Tweak python program to give result in json

Hi , Below is the script which prints result in json but when i validate it has some tab or extra space issues. JSON result { "data": } This is the line I tweaked. Please advise. print "\t{", "\"{#NAME}\":\""+container+hn+"\"}" #!/usr/bin/env python # (2 Replies)
Discussion started by: ashokvpp
2 Replies
PSWRAP(1)						      General Commands Manual							 PSWRAP(1)

NAME
pswrap - creates C procedures from segments of PostScript language code SYNOPSIS
pswrap [ -apr ] [ -o outputCfile ] [ -h outputHfile ] [ -s maxstring ] inputfile DESCRIPTION
pswrap reads input from inputfile and creates C-callable procedures, known as wraps, that send PostScript language code to the PostScript interpreter. inputfile contains segments of PostScript language code wrapped with a C-like procedure syntax. Wraps are the most efficient way for an application to communicate with the PostScript interpreter. For complete documentation of pswrap and the language it accepts, see "pswrap Reference Manual" in Programming the Display PostScript System with X. OPTIONS
inputfile A file that contains one or more wrap definitions. pswrap transforms the definitions in inputfile into C procedures. If no input file is specified, the standard input (which can be redirected from a file or pipe) is used. The input file can include text other than wrap definitions. pswrap converts wrap definitions to C procedures and passes the other text through unchanged. Therefore, it is possible to intersperse C-language source code with wrap definitions in the input file. Note: Although C code is allowed in a pswrap input file, it is not allowed within a wrap body. In particular, no CPP macros (for example, #define) are allowed inside a wrap. -a Generates ANSI C procedure prototypes for procedure definitions in outputCfile and, optionally, outputHfile. The -a option allows compilers that recognize the ANSI C standard to do more complete type checking of parameters. The -a option also causes pswrap to generate const declarations. Note: ANSI C procedure prototype syntax is not recognized by most non-ANSI C compilers, including many compilers based on the Porta- ble C Compiler. Use the -a option only in conjunction with a compiler that conforms to the ANSI C Standard. -h outputHFile Generates a header file that contains extern declarations for non-static wraps. This file can be used in #include statements in mod- ules that use wraps. If the -a option is specified, the declarations in the header file are ANSI C procedure prototypes. If the -h option is omitted, a header file is not produced. -o outputCFile Specifies the file to which the generated wraps and passed-through text are written. If omitted, the standard output is used. If the -a option is also specified, the procedure definitions generated by pswrap are in ANSI C procedure prototype syntax. -p Specifies that strings passed by wraps are padded so that each data object begins on a long-word (4-byte) boundary. This option allows wraps to run on architectures that restrict data alignment to 4-byte boundaries and improves performance on some other archi- tectures. -r Generates reentrant code for wraps shared by more than one process (as in shared libraries). Reentrant code can be called recur- sively or by more than one thread. The -r option causes pswrap to generate extra code, so use it only when necessary. -s maxstring Sets the maximum allowable length of a PostScript string object or hexadecimal string object in the wrap body input. A syntax error is reported if a string is not terminated with ) or > within maxstring characters. maxstring cannot be set lower than 80; the default is 200. SEE ALSO
Programming the Display PostScript System with X (Addison-Wesley Publishing Company, Inc., 1993). AUTHOR
Adobe Systems Incorporated NOTES
PostScript and Display PostScript are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions. Copyright (c) 1988-1994 Adobe Systems Incorporated. All rights reserved. Adobe Systems 4 Apr 1994 PSWRAP(1)
All times are GMT -4. The time now is 08:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy