Sponsored Content
Full Discussion: parameters
Top Forums Shell Programming and Scripting parameters Post 302185004 by danmero on Monday 14th of April 2008 02:42:17 AM
Old 04-14-2008
Quote:
Originally Posted by jaay
Code:
if [ $# -ge 2 ]; then
       echo "Too many parameters. Usage: file-info [directory]"
       exit
fi

my question is, how do i use the current directory if no parameter is provided?
If no argument is provided, set the first argument to current directory.
Code:
if [ $# -ge 2 ]; then
       echo "Too many parameters. Usage: file-info [directory]"
       exit
elif [ $# -eq 0 ];then set `pwd`;
fi

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Parameters Help.

I can test for one parameter but anything more then that and I get an Error. I forgot I run this batch in a shell #!/bin/sh ------------------------------------------------------------------------- Write a batch program that accepts a keyword as a parameter and finds all the files... (3 Replies)
Discussion started by: james2006
3 Replies

2. Shell Programming and Scripting

parameters

I have a script that needs to check if the given parameters are a combination of 0123456789 and not a word or another irelevant character.please help (6 Replies)
Discussion started by: aekaramg20
6 Replies

3. Shell Programming and Scripting

Input parameters

I have a script which take 3 input parameters 1st - a date (i.e. current date) 2nd - type (i.e. A) 3rd - limit (i.e. 40) normally the date parameter would be current date, so I thought I could do this calculate.sh $(date +%Y-%m-%d) A 40 however, it seems like it can't be done,... (3 Replies)
Discussion started by: mpang_
3 Replies

4. HP-UX

Need to look at Kernel parameters

Hello all, Can anyone tell me the command line I can use to look at the following Kernel parameters: nfile maxfile maxfile_lim I'm using the Reflection manager connection to my Unix box so I can't use SAM. (3 Replies)
Discussion started by: impunchdrunk
3 Replies

5. Shell Programming and Scripting

More than nine parameters

Hi, please tell me the systax for passing 11 variables(including 4compulsory variables) in shell program. ORA_USERPASS=`echo $1` USERID=`echo $2` USERNAME=`echo $3` REQUESTID=`echo $4` P5=`echo $5` P6=`echo $6` P7=`echo $7` P8=`echo $8` P9=`echo $9` shift P10=`echo $9` shift... (3 Replies)
Discussion started by: anitha126
3 Replies

6. AIX

tuning network parameters : parameters not persist after reboot

Hello, On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command. tunrestore -R is present in inittab in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log ... (0 Replies)
Discussion started by: dantares
0 Replies

7. Solaris

Kernel Parameters

Dear All, I have weblogic Portal Installed in the Server solaris 10. How can i verify whether all the kernel parameters are available for this Software and also another question is How to crosscheck a server ( Solaris 10 Sparc ) whether it has all the required kernel parameters. ... (2 Replies)
Discussion started by: jegaraman
2 Replies

8. Shell Programming and Scripting

Playing with parameters

Can someone help me of doing something like this send.sh #!/bin/bash for last; do true; done echo $* | gammu sendsms TEXT $last every thing is good except that when i launch the script like this ./send.sh This is the message i want to send +63922XXXXXXX it turned out the message of... (2 Replies)
Discussion started by: arturo322
2 Replies

9. UNIX for Advanced & Expert Users

parameters file

Hi, on AIX 6.1 I have a shell script that calls another shell which have some parameters. Say like the following : ##This is main script############ myparameters.sh command1 command2 ..... .... And here myparameteres.sh : export ORACLE_SID=MYDB export... (6 Replies)
Discussion started by: big123456
6 Replies

10. Shell Programming and Scripting

Getting parameters

Hi, I have 2 scripts one master.sh and child.sh. The master runs on a separate server and pushes the child script to the desginated server and runs it.The child script configures the designated server for our day to day use and it has lot of interactive questions which help the... (4 Replies)
Discussion started by: a12ka4
4 Replies
ndd(1M) 																   ndd(1M)

NAME
ndd - network tuning SYNOPSIS
network_device parameter network_device parameter value [parameter] DESCRIPTION
The command allows the examination and modification of several tunable parameters that affect networking operation and behavior. It accepts arguments on the command line or may be run interactively. The option displays all the supported and unsupported tunable parameters that provides in the following categories: ARP, IP, IPSEC, IPV6, IPV6 Neighbor Discovery (ND), RAWIP, RAWIP6, SOCKET, TCP, and UDP. The tunable parameters in each category may be accessed with the proper valid network_device name. The network_device name is referred to as in The valid network_device names (and their associated parameter categories) are: (ARP), (IP and IPSEC), (IPV6, IPV6 Neighbor Discovery, and IPSEC v6), (RAWIP), (RAWIP6), (SOCKET), (TCP), and (UDP). Set parameter to to get a list of parameters for a particular network_device. Get the value of the parameter for network_device and print the value to standard output. Returned numbers are always displayed as decimal strings. Set parameter for network_device to value. All times are specified in milliseconds; for example, 240000 for 4 minutes. Unless stated otherwise, numbers are assumed to be in decimal. Use "0x" prefix to specify hexadecimal values. In general, all tunable parameters are global; in other words, they affect all instances of the network module. Some settings take effect immediately, while others are used to initialize data for an instance and will only affect newly opened streams. Display all the supported tunable parameters. This set of parameters are supported by HP and detailed descriptions of these tunable parameters are available through the parameter command. Display all the unsupported tunable parameters. This set of parameters are not supported by HP and modification of these tunable parameters are not suggested nor rec- ommended. Setting any unsupported tunable parameters on your system may result in adverse effects to your networking operations. When parameter is specified, a detail description of the parameter, along with its minimum, maximum, and default value are displayed. If no parameter is specified, it displays all supported and unsupported tunable parameters. Read input from the configuration file and set the tunable parameters. A user may specify tunable parameters in the nddconf configuration file, and these parameters will be set automatically each time the system boots. DIAGNOSTICS
When the command fails, an error message is printed to the standard error and the command terminates with an exit value of one. WARNINGS
Care must be used when setting parameters for a network_device. Setting a tunable parameter to an inappropriate value can result in adverse affects to your networking operations. EXAMPLES
To get help information on all supported tunable parameters: To get a detail description of the tunable parameter, To get a list of all TCP related parameters: To get the current value of the tunable parameter, To set the value of the default TTL parameter for UDP to 128: FILES
Contains tunable parameters that will be set automatically each time the system boots. AUTHOR
was developed by HP. ndd(1M)
All times are GMT -4. The time now is 05:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy