Sponsored Content
Top Forums Shell Programming and Scripting Bash - re-ordering list of parameters Post 303018706 by RudiC on Wednesday 13th of June 2018 02:19:51 PM
Old 06-13-2018
Post your script.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

BASH: how to launch a program with parameters

Hi, I'm a pretty big fan of BASH scripting. I've got a bunch I use for random things and lately a couple issues have been plaguing me. Both are somewhat related, in that they deal with filenames with spaces and "escaped" characters and with launching a program with command line arguements... (5 Replies)
Discussion started by: TinCanFury
5 Replies

2. Shell Programming and Scripting

Get the List of functions with modified parameters

Hi I have 2 files a.c and a.bak where I changed long to int using awk script. I want to get the list of functions whose parameters got modified for eg: fun ( long a, long b ) might be changed to fun ( int a, int b ) (1 Reply)
Discussion started by: Sivaswami
1 Replies

3. Shell Programming and Scripting

bash if loop for checking multiple parameters

Hello, I've got next problem: I want to examine at the beginning of a script in an if loop that: 1. Is there 4 parameters given 2. If first state is true then: is there switches -e and -d? 3. At the end, how can i indentify them as variebles regardlees to its order. I was thinking like... (2 Replies)
Discussion started by: szittyafergeteg
2 Replies

4. Shell Programming and Scripting

Parameters passed to commands but not working in Bash shell

Hi, I am trying to do this thing useing my shell bash ( sorry for my english ) I have in a file 63 hostnames, i wanna ask to the DHCP admin, to reserv that reserves 63 IP addresses of this hosts, using their mac address. I have thinked this script: for ((i=1;i<63;i++)); do arp $(head... (10 Replies)
Discussion started by: Cypress
10 Replies

5. Shell Programming and Scripting

bash script function parameters

I have a question about bash script. Can I create a function there that accept parameters like functions in program language? (2 Replies)
Discussion started by: programAngel
2 Replies

6. Shell Programming and Scripting

Ordering HTML Drop Down List entries Alphabetically

Hi, So I have a web page that has some drop down boxes with a whole bunch of entries. Unfortunately, they have been added over time and started from a small list and is now extremely messy. I'm looking to write script so I can just copy in the section of the HTML code and have it sorted for... (6 Replies)
Discussion started by: jedel
6 Replies

7. 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

8. Shell Programming and Scripting

Bash Positional Parameters Question

In a Bash script I used getopts command to let a user does something regards to the selected options. The question is: How do you find out what is the name of the file that user inserted in the command line like the following: The good part is this file is always the last argument in the... (2 Replies)
Discussion started by: bashily
2 Replies

9. Shell Programming and Scripting

How to call a bash script with positional parameters?

Hi, I have a script which will be executed using the below command, bin/nutch crawl urls -dir /data/test/ bin/nutch - Script file crawl, urls, /data/test/ - Parameters -dir - Option The above script should executed from a shell script named test.sh. I have the below code to execute... (2 Replies)
Discussion started by: vel4ever
2 Replies

10. Shell Programming and Scripting

How do i check if all parameters are set in bash?

Hi, I have 4 parameters passed to my shell and i validate if all four are entered using the following snippet: if then echo "Not entered" else echo "entered" fi I get the following output as 'Not entered even when i enter the values for all prompts. Please advise. Thanks. (5 Replies)
Discussion started by: Jesshelle David
5 Replies
ndd(1M) 						  System Administration Commands						   ndd(1M)

NAME
ndd - get and set driver configuration parameters SYNOPSIS
ndd [-set] driver parameter [value] DESCRIPTION
ndd gets and sets selected configuration parameters in some kernel drivers. Currently, ndd only supports the drivers that implement the TCP/IP Internet protocol family. Each driver chooses which parameters to make visible using ndd. Since these parameters are usually tightly coupled to the implementation, they are likely to change from release to release. Some parameters may be read-only. If the -set option is omitted, ndd queries the named driver, retrieves the value associated with the specified parameter, and prints it. If the -set option is given, ndd passes value, which must be specified, down to the named driver which assigns it to the named parameter. By convention, drivers that support ndd also support a special read-only parameter named ``?'' which can be used to list the parameters supported by the driver. EXAMPLES
Example 1: Getting Parameters Supported By The TCP Driver To see which parameters are supported by the TCP driver, use the following command: example% ndd /dev/tcp ? The parameter name ``?'' may need to be escaped with a backslash to prevent its being interpreted as a shell meta character. The following command sets the value of the parameter ip_forwarding in the dual stack IP driver to zero. This disables IPv4 packet forward- ing. example% ndd -set /dev/ip ip_forwarding 0 Similarly, in order to disable IPv6 packet forwarding, the value of parameter ip6_forwarding example% ndd -set /dev/ip ip6_forwarding 0 To view the current IPv4 forwarding table, use the following command: example% ndd /dev/ip ipv4_ire_status To view the current IPv6 forwarding table, use the following command: example% ndd /dev/ip ipv6_ire_status ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
nca(1), ioctl(2), attributes(5), arp(7P), ip(7P), ip6(7P), tcp(7P), udp(7P) NOTES
The parameters supported by each driver may change from release to release. Like programs that read /dev/kmem, user programs or shell scripts that execute ndd should be prepared for parameter names to change. The ioctl() command that ndd uses to communicate with drivers is likely to change in a future release. User programs should avoid making dependencies on it. The meanings of many ndd parameters make sense only if you understand how the driver is implemented. SunOS 5.10 8 Nov 1999 ndd(1M)
All times are GMT -4. The time now is 01:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy