02-24-2006
please help quickly..
I want to pass arguments to a sh program and I want to use these arguments in the program as variables?
Will I use argc and argv in a main function can anyone around me write the full code please
for example when I write in th command
sh myprogram.sh argument1 argument2
I want to use these arguments
please help me
7 More Discussions You Might Find Interesting
1. AIX
Hi,
I have an AIX 4.3 H80 running oracle 8i.
My /(ROOT) partion is mounted seperately from others (/usr, /var, /tmp, etc)
However, the partion fills up almost nightly.
Appreciate any ideas that'll help solve my problem.
Thank you. (1 Reply)
Discussion started by: svjn
1 Replies
2. UNIX for Dummies Questions & Answers
Write a nawk script that will produce the following report:
***FIRST QUARTERLY REPORT***
***CAMPAIGN 2004 CONTRIBUTIONS***
-------------------------------------------------------------------------
NAME PHONE Jan | ... (5 Replies)
Discussion started by: p.palakj.shah
5 Replies
3. Shell Programming and Scripting
Still trying to get the basics down and I would like a different solution to what I'm currently doing and a better understanding of why it's happening. I've written a simple backup script that tars individual directories and then dumps them to a NFS drive. STDERR is being dumped into a process... (2 Replies)
Discussion started by: mandelbrot333
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am in /home/development/project/abc directory. Now I want to remove one file which is kept in /trial/dev/<file> directory.
I would like to do it in one command.
I tried changing directory in one command like:
pwd
/home/development/project/abc
cd ~/trial/dev/
bash: no command... (2 Replies)
Discussion started by: palak08
2 Replies
5. Shell Programming and Scripting
Hello,
Have been trying to develop a script that reads a string from an input file then looks up that string in a reference file to get a number, then inset that number back into the original file at a certain point (_____):
Input File:
HARRY JON _____ AA M N
PETER PIE ... (8 Replies)
Discussion started by: dendright
8 Replies
6. Shell Programming and Scripting
Hello everyone!
I am new here and by new i don't mean only in this place, but in this shell scripting area. I started learning about Operation Systems only 2 months ago.
I want to learn more but i found a problem which I don't really know how to solve. :confused:
I have a directory with 4... (2 Replies)
Discussion started by: Stripes07
2 Replies
7. Solaris
Hi guys,
one of my services in solaris 10 is in maintenance mode. When I checked why, the reason is that the service is "restarting too quickly."
# svcs -x svc:/application/management/snmpdx:default
svc:/application/management/snmpdx:default (Sun Solstice Enterprise Master Agent)
State:... (2 Replies)
Discussion started by: cjashu
2 Replies
LEARN ABOUT ULTRIX
xsetcommand
XSetCommand(3X11) MIT X11R4 XSetCommand(3X11)
Name
XSetCommand, XGetCommand - set or read a window's WM_COMMAND property
Syntax
XSetCommand(display, w, argv, argc)
Display *display;
Window w;
char **argv;
int argc;
Status XGetCommand(display, w, argv_return, argc_return)
Display *display;
Window w;
char ***argv_return;
int *argc_return;
Arguments
argc Specifies the number of arguments.
argc_return
Returns the number of arguments returned.
argv Specifies the application's argument list.
argv_return
Returns the application's argument list.
display Specifies the connection to the X server.
w Specifies the window.
Description
The function sets the command and arguments used to invoke the application. (Typically, argv is the argv array of your main program.)
can generate and errors.
The function reads the WM_COMMAND property from the specified window and returns a string list. If the WM_COMMAND property exists, it is
of type STRING and format 8. If sufficient memory can be allocated to contain the string list, fills in the argv_return and argc_return
arguments and returns a non-zero status. Otherwise, it returns a zero status. To free the memory allocated to the string list, use
Properties
WM_COMMAND
The command and arguments, separated by ASCII nulls, used to invoke the application.
Diagnostics
The server failed to allocate the requested resource or server memory.
A value for a Window argument does not name a defined Window.
See Also
XAllocClassHint(3X11), XAllocIconSize(3X11), XAllocSizeHints(3X11), XAllocWMHints(3X11), XSetTransientForHint(3X11), XSetTextProp-
erty(3X11), XSetWMClientMachine(3X11), XSetWMColormapWindows(3X11), XSetWMIconName(3X11), XSetWMName(3X11), XSetWMProperties(3X11), XSetWM-
Protocols(3X11), XStringListToTextProperty(3X11)
X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys
XSetCommand(3X11)