Thanks for the quick turn around, that's one way of doing it which I am aware of. But I need something that I can keep loading dynamically just before executing the command. Password was just an example I provided, I have other variables that I need to load in other scenarios. I need something that I need to do at command line.
like:
do we have something like that in linux, to load configuration at command line dynamically, apart from the one way I have posted in this reply.
im kind alost. i beleave its a sed command. but i cant seem to find it in my book. can someone point me in the write direction.
i know this is extreamly sloppy. but this is what i did untill i can figure out how to manipulate the filename namespace.
an ls on the directory where this would run... (2 Replies)
hi all
need your help.
I am wrting a script that will load data into the table.
then on another load will append the data into the existing table.
Regards
Ankit (1 Reply)
Hi,
I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below.
I will be using the config file as mentioned below:
(config.txt)
country:a,b
city:1,2
type:b1... (1 Reply)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Hi All,
I am working on nawk script, has the small function which prints the output on the screen.Am trying to print/append the same output in a file.
Basically nawk script should print the output on the console/screen and as well it should write/append the same result to a file.
script :... (3 Replies)
Hi folks,
I am trying to configure Apache webserver and also a virtual host inside this webserver.
For Global server config: /var/www/html/index.html
For virtual host config: /var/www/virtual/index.html
Both client10 & www10 are pointing to 192.168.122.10 IP address.
BUT, MY... (1 Reply)
Hello, on my hostserver i see one VPS of mine got load of 200.00 and netstat nothing (not a single blank line on netstat command) after some time, netstat started showing connections, but i see no excessive IP connections.
tail -f /var/log/httpd/access_log shows no activity
/var/log/messages ;... (1 Reply)
Hi, i want to add a line at the beginning of every file in a directory.
perl -i.bkp -p -e 'print "#include /verif/pdd1/exu/sxs/6sTest/reset/dfu/top_level.reset\n" if $. == 1' *.reset
But this command is updating only the first file in the directory. I think this is because $. is not resetting... (3 Replies)
Discussion started by: twistedpair
3 Replies
LEARN ABOUT DEBIAN
upscmd
UPSCMD(8) NUT Manual UPSCMD(8)NAME
upscmd - UPS administration program for instant commands
SYNOPSIS
upscmd -h
upscmd -l ups
upscmd [-u username] [-p password] ups command
DESCRIPTION
upscmd allows you to invoke "instant commands" in your UPS hardware. Not all hardware supports this, so check the list with -l to see if
anything will work on your equipment.
On hardware that supports it, you can use this program to start and stop battery tests, invoke a front panel test (beep!), turn the load on
or off, and more.
OPTIONS -h
Display the help message.
-l ups
Show the list of supported instant commands on that UPS. Some hardware may not support any of them.
-u username
Set the username for the connection to the server. This is optional, and you will be prompted for this when invoking a command if -u is
not used.
-p password
Set the password to authenticate to the server. This is also optional like -u, and you will be prompted for it if necessary.
ups
Connect to this UPS. The format is upsname[@hostname[:port]]. The default hostname is "localhost".
UNATTENDED MODE
If you run this program inside a shell script or similar to invoke a command, you will need to specify all of the information on the
command line. This means using -u and -p. Otherwise it will put up a prompt and your program will hang.
This is not necessary when displaying the list, as the username and password are not required for read-only mode.
DANGEROUS COMMANDS
Some drivers like apcsmart(8) have built-in paranoia for the dangerous commands like load.off. To make them actually turn off the load, you
will have to send the command twice within a short window. That is, you will have to send it once, then send it again after 3 seconds
elapse but before 15 seconds pass.
This paranoia is entirely defined within the driver. upsd and upscmd have no control over the timing.
DIAGNOSTICS
upscmd won't work unless you provide a valid username and password. If you get "access denied" errors, make sure that your upsd.users(5)
has an entry for you, and that the username you are using has permissions to SET variables.
BUGS
There is currently no way to tell the user when the driver requires confirmation to invoke a command such as load.off. Similarly, there is
not yet a way to tell the user if a command succeeds or fails.
This is on the list of things to fix in the future, so don't despair. It involves magic cookies.
SEE ALSO upsd(8), upsrw(8)INTERNET RESOURCES
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/21/2012 UPSCMD(8)