Sponsored Content
Top Forums Shell Programming and Scripting passing parameters to the script Post 302635867 by knip on Sunday 6th of May 2012 01:15:34 PM
Old 05-06-2012
passing parameters to the script

how can i make a script to run only when parameters are given,
if parameters are not given it should through an error , saying "please enter a parameter"

for ex: i want a find command to run only when the parameters are given
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Passing parameters in script

I have 2 scripts: script1 and script2 Script1 passes 4 parameters to script2 as follows #script1 code ... ... script2 $var1 $var2 $var3 $var4 Script2 uses the export command to know to expect these values #script2 export $1 $2 $3 $4 code ... ... The problem that I am having is... (1 Reply)
Discussion started by: eliguy
1 Replies

2. Shell Programming and Scripting

passing parameters from a shell script to sqlplus

Hi , I want to pass parameters from a shell script to a sql script and use the parameter in the sql query ..and then I want to spool a particular select query on to my unix box... for 4 different locations by writing only one sql script Right now no file is generated on the unix box...it is a... (2 Replies)
Discussion started by: phani
2 Replies

3. Programming

Passing Parameters and getting values back from a c program to Shell script

I am having a shell script which has to be called from a C program. I have to pass two parameters to this script. HOw can I do that? eg: int main() { char st1; char str2; // call a shell script call_sh(str1,str2) where call_sh is the name of the shell script. then i need to get the return... (5 Replies)
Discussion started by: Rajeshsu
5 Replies

4. Shell Programming and Scripting

Random parameters passing in FTP script

Hi I have a question. In the FTP script if we are passing all the required value like Hostname, username, password, Action(put or get), Filename, & mode(ascii or binary) through parameters then we have to pass these in the exact orders in which they are taken like if we defined Username=$2... (2 Replies)
Discussion started by: sourabhshakya
2 Replies

5. Shell Programming and Scripting

Passing parameters to Shell script for GREP command

I am using grep to capture date from a file . Since i need to use the shell script for different dates ,is it possible to pass the date parameter to the shell script the Script is as below grep -E "08 Aug 2008|2008-08-08"* somefile.txt>test.txt The above script file greps the... (1 Reply)
Discussion started by: sud.tech
1 Replies

6. Shell Programming and Scripting

Shell Script Passing Parameters For Directory Listing

i have this basic piece of code that i am trying to debug to accept input parameter to be able to display a directory listing of files. cd /u02/app/eatv/dev/out CURDIR=`pwd` echo directory listing of $CURDIR echo if ; then ls -latr else ls -latr $1 fi basically if the script... (9 Replies)
Discussion started by: wtolentino
9 Replies

7. Shell Programming and Scripting

passing parameters from a script to a datastage job

We have a requirement as follows. We have created a datastage job that will be doing the select operation from table (select query from a table). The datastage job is being invoked by a unix shell script(ksh). We are passing the "table name (STUD_DETAILS)" and a "where clause condition... (4 Replies)
Discussion started by: kmanivan82
4 Replies

8. Shell Programming and Scripting

Passing parameters to bash script function (or subroutine)

I've found a few posts regarding passing parameters to a function or subroutine, but for some reason when I try to run a command based on part with these parameters it's not working. If I have the function echo the parameters they show correctly so I believe they are being passed right but the... (2 Replies)
Discussion started by: withanh
2 Replies

9. Shell Programming and Scripting

Shell Script passing parameters to sqlplus code

Hello All, I am interested in finding out a way to pass parameters that are entered at the prompt from HP unix and passed to SQLPlus code with a Shell Script. Is this possible? Thanks (4 Replies)
Discussion started by: compprog11
4 Replies

10. Shell Programming and Scripting

Passing command line parameters into script

Not a good post. (1 Reply)
Discussion started by: bash_in_my_head
1 Replies
vncconfig(1)						     Virtual Network Computing						      vncconfig(1)

NAME
vncconfig - configure and control a VNC server SYNOPSIS
vncconfig [parameters] vncconfig [parameters] -connect host[:port] vncconfig [parameters] -disconnect vncconfig [parameters] [-set] Xvnc-param=value ... vncconfig [parameters] -list vncconfig [parameters] -get Xvnc-param vncconfig [parameters] -desc Xvnc-param DESCRIPTION
vncconfig is used to configure and control a running instance of Xvnc, or any other X server with the VNC extension. Note that it cannot be used to control VNC servers prior to version 4. When run with no options, it runs as a kind of "helper" application for Xvnc. Its main purpose when run in this mode is to support clip- board transfer to and from the VNC viewer(s). Note that without a running instance of vncconfig there will be no clipboard support. It puts up a window with some checkboxes which can be used to disable clipboard transfers if required (in the future there may be more func- tions available from this window). The -nowin flag can be used if you always want clipboard support but don't wish to clutter the desktop with this window - alternatively the -iconic option can be used to make it iconified by default. When run in any other mode, vncconfig is a one-shot program used to configure or control Xvnc as appropriate. It can be used to tell Xvnc to connect or disconnect from listening viewers, and to set and retrieve Xvnc's parameters. Note that the DISPLAY environment variable or the -display option must be set as appropriate to control Xvnc. If you run it on an ordinary X server (or on a version 3 Xvnc) you will get an error message saying that there is no VNC extension. OPTIONS
-connect host[:port] Tells an Xvnc server to make a "reverse" connection to a listening VNC viewer (normally connections are made the other way round - the viewer connects to the server). host is the host where the listening viewer is running. If it's not listening on the default port of 5500, you can specify host:port instead. -disconnect This causes Xvnc to disconnect from all viewers so that the VNC desktop is not displayed anywhere. [-set] Xvnc-param=value Sets an Xvnc parameter to the given value. Note that some of Xvnc's parameters are read only once at startup so that changing them in this way may not have any effect. -list Lists all the parameters supported by Xvnc. -get Xvnc-param Prints the current value of the given Xvnc parameter. -desc Xvnc-param Prints a short description of the given Xvnc parameter. PARAMETERS
vncconfig also has parameters of its own which can be set on the command line. These should not be confused with Xvnc's parameters which are manipulated with the -set, -get, -list and -desc options. Parameters can be turned on with -param or off with -param=0. Parameters which take a value can be specified as -param value. Other valid forms are param=value -param=value --param=value. Parameter names are case-insensitive. -display Xdisplay Specifies the Xvnc server to control. -nowin When run as a "helper" app, don't put up a window. -iconic When run as a "helper" app, make the window iconified at startup. SEE ALSO
vncpasswd(1), vncviewer(1), vncserver(1), Xvnc(1) http://www.realvnc.com AUTHOR
Tristan Richardson, RealVNC Ltd. VNC was originally developed by the RealVNC team while at Olivetti Research Ltd / AT&T Laboratories Cambridge. It is now being maintained by RealVNC Ltd. See http://www.realvnc.com for details. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability | | +-----------------------------+-----------------------------+ |Interface Stability | | +-----------------------------+-----------------------------+ RealVNC Ltd 03 Mar 2005 vncconfig(1)
All times are GMT -4. The time now is 02:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy