Sponsored Content
Full Discussion: Command line argument
Top Forums UNIX for Beginners Questions & Answers Command line argument Post 302975631 by mutley2202 on Thursday 16th of June 2016 07:31:15 AM
Old 06-16-2016
Hi Stomp,
I'm in control of a built in script which i cant modify so am having to try find a working way of being able to change the command being run. As an example below, basically i want to be able to change the 'show log' command to a command that can be entered on command line.

Code:
 Capture_log command='show log' -o file='/home/user1/1.txt

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

array as command line argument !!!!

hello, can any help me how to can pass array as command line argument in korn shell. also how to read a array from command line. thanks spandu (2 Replies)
Discussion started by: spandu
2 Replies

2. Shell Programming and Scripting

How to get the value in last command line argument???

Say I want to get the value of last command line argument using the value in $# (or some other way if u can suggest) how do I do it?? $"$#" `$"$#"` These don't work :( (4 Replies)
Discussion started by: amit_oddey21
4 Replies

3. Shell Programming and Scripting

assign a command line argument and a unix command to awk variables

Hi , I have a piece of code ...wherein I need to assign the following ... 1) A command line argument to a variable e.g origCount=ARGV 2) A unix command to a variable e.g result=`wc -l testFile.txt` in my awk shell script When I do this : print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies

4. Programming

Command Line Argument

Hi, I have a very simple C program which will run in UNIX. When i am passing * as the command line argument, i am gettig the below output. Program: #include <stdio.h> #include "mylibrary.h" int **environ; int main(int argc,char *argv) { int i; printf("\nHello... (2 Replies)
Discussion started by: dsudipta
2 Replies

5. Shell Programming and Scripting

Need Help with the argument passing Through Command line

$$$$$ (5 Replies)
Discussion started by: asirohi
5 Replies

6. Shell Programming and Scripting

finding * in command line argument

I have to write a script to determine whether given command line argument ($1) contains "*" symbol or not, if $1 does not contains "*" symbol add it to $1, otherwise show message "Symbol is not required". For e.g. If we called this script q5 then after giving , $ q5 /bin Here $1 is /bin, it... (5 Replies)
Discussion started by: cynosure2009
5 Replies

7. Shell Programming and Scripting

command-line line 0: Missing yes/no argument

Hi Guys When I run the below command ssh -o 'PasswordAuthentication yes' -o 'PreferredAuthentications publickey' -i $HOME/.ssh/id_dsa Server_Name I found the below error ommand-line line 0: Missing yes/no argument Kindly help me to sort out Double post, continued... (0 Replies)
Discussion started by: Pratik4891
0 Replies

8. Shell Programming and Scripting

Help on command line argument in csh

HI , I am new to csh. I need to pass some command line arguments like ./abc.sh -os Linux -path abc -tl aa -PILX 1 I have defined the loop as shown below. But its taking "-os" switches as arguments. Its treating them as arguments. How to resolve it? while ( $#argv != 0 ) switch ($argv) ... (7 Replies)
Discussion started by: vineet.dhingra
7 Replies

9. Shell Programming and Scripting

Can a string be a command line argument?

I would like to use a string as a command line argument...is this possible using TCSH? For example say my script is called TEST and I would like to pass a string into my script stating why the test failed. EXAMPLE: TEST "Failed due to missing statement" (4 Replies)
Discussion started by: thibodc
4 Replies

10. Shell Programming and Scripting

Specify an entire UNIX command as a command line argument

I'm trying to write a bash script called YN that looks like the following YN "Specify a question" "doThis" "doThat" where "doThis" will be executed if the answer is "y", otherwise "doThat". For example YN "Do you want to list the file dog?" "ls -al dog" "" Here's my attempt... (3 Replies)
Discussion started by: LeoKSimon
3 Replies
RADMIN(8)					       FreeRADIUS Server Administration Tool						 RADMIN(8)

NAME
radmin - FreeRADIUS Administration tool SYNOPSIS
radmin [-d config_directory] [-e command] [-E] [-f socket_file] [-h] [-i input_file] [-n name] [-o output_file] [-q] DESCRIPTION
FreeRADIUS Server administration tool that connects to the control socket of a running server, and gives a command-line interface to it. At this time, only a few commands are supported. Please type "help" at the command prompt for detailed information about the supported commands. WARNING
The security protections offered by this command are limited to the permissions on the Unix domain socket, and the server configuration. If someone can connect to the Unix domain socket, they have a substantial amount of control over the server. OPTIONS
The following command-line options are accepted by the program. -d config directory Defaults to /etc/raddb. radmin looks here for the server configuration files to find the "listen" section that defines the control socket filename. -e command Run command and exit. -E Echo commands as they are being executed. -f socket_file Specify the socket filename directly. The radiusd.conf file is not read. -h Print usage help information. -i input_file Reads input from the specified file. If not specified, stdin is used. This also sets "-q". -n mname Read raddb/name.conf instead of raddb/radiusd.conf. -o output_file Write output to the specified file. If not specified, stdout is used. This also sets "-q". -q Quiet mode. COMMANDS
The commands implemented by the command-line interface are almost completely controlled by the server. There are a few commands inter- preted locally by radmin: reconnect Reconnect to the server. quit Exit from radmin. exit Exit from radmin. The other commands are implemented by the server. Type "help" at the prompt for more information. EXAMPLES
debug file /var/log/radius/bob.log Set debug logs to /var/log/radius/bob.log. There is very little checking of this filename. Rogue administrators may be able use this command to over-write almost any file on the system. If those administrators have write access to "radius.conf", they can do the same thing without radmin, too. debug condition '(User-Name == "bob")' Enable debugging output for all requests that match the condition. Any "unlang" condition is valid here. The condition is parsed as a string, so it must be enclosed in single or double quotes. Strings enclosed in double-quotes must have back-slashes and the quotation marks escaped inside of the string. Only one debug condition can be active at a time. debug condition '((User-Name == "bob") || (Packet-Src-IP-Address == 192.0.2.22))' A more complex condition that enables debugging output for requests containing User-Name "bob", or requests that originate from source IP address 192.0.2.22. debug condition Disable debug conditionals. FULL LIST OF COMMANDS
add <command> do sub-command of add add client <command> Add client configuration commands add client file <filename> Add new client definition from <filename> debug <command> debugging commands debug condition [condition] Enable debugging for requests matching [condition] debug level <number> Set debug level to <number>. Higher is more debugging. debug file [filename] Send all debugging output to [filename] del <command> do sub-command of del del client <command> Delete client configuration commands del client ipaddr <ipaddr> Delete a dynamically created client hup [module] sends a HUP signal to the server, or optionally to one module inject <command> commands to inject packets into a running server inject to <ipaddr> <port> Inject packets to the destination IP and port. inject from <ipaddr> Inject packets as if they came from <ipaddr> inject file <input-file> <output-file> Inject packet from input-file>, with results sent to <output-file> reconnect reconnect to a running server terminate terminates the server, and cause it to exit set <command> do sub-command of set set module <command> set module commands set module config <module> variable value set configuration for <module> set module status [alive|dead] set the module to be alive or dead (always return "fail") set home_server <command> set home server commands set home_server state <ipaddr> <port> [alive|dead] set state for given home server show <command> do sub-command of show show client <command> do sub-command of client show client config <ipaddr> show configuration for given client show client list shows list of global clients show debug <command> show debug properties show debug condition Shows current debugging condition. show debug level Shows current debugging level. show debug file Shows current debugging file. show home_server <command> do sub-command of home_server show home_server config <ipaddr> <port> show configuration for given home server show home_server list shows list of home servers show home_server state <ipaddr> <port> shows state of given home server show module <command> do sub-command of module show module config <module> show configuration for given module show module flags <module> show other module properties show module list shows list of loaded modules show module methods <module> show sections where <module> may be used show uptime shows time at which server started show version Prints version of the running server show xml <reference> Prints out configuration as XML stats <command> do sub-command of stats stats client [auth/acct] <ipaddr> show statistics for given client, or for all clients (auth or acct) stats home_server [<ipaddr>/auth/acct] <port> show statistics for given home server (ipaddr and port), or for all home servers (auth or acct) stats detail <filename> show statistics for the given detail file SEE ALSO
unlang(5), radiusd.conf(5), raddb/sites-available/control-socket AUTHOR
Alan DeKok <aland@freeradius.org> 14 Mar 2011 RADMIN(8)
All times are GMT -4. The time now is 01:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy