Sponsored Content
Full Discussion: numbering blanks
Top Forums UNIX for Advanced & Expert Users numbering blanks Post 302097162 by blowtorch on Wednesday 22nd of November 2006 04:49:05 AM
Old 11-22-2006
Good point... was probably in dummy mode when I wrote that.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Numbering!

Just a shot question... how to make 1,2,3,...999 into the form of 001,002,003....999 (3 digits) Thanks.... (9 Replies)
Discussion started by: biglemon
9 Replies

2. Shell Programming and Scripting

Numbering

I'm trying to do a script that will look for a log file if it is already there change the name to another name. I.E if log.0 is there rename to log.1 rename log.1 to log.2 rename log.2 to log.3 and so on. Only thing is I got no idea where or what is the best command to use for this? ... (3 Replies)
Discussion started by: merlin
3 Replies

3. Shell Programming and Scripting

blanks in an awk comand

Hi, Im trying to write something that will report if a filesytem is over 80% but the problem is the output reports on a dir that is a 9%. any ideas? this is what I have ************************************************* if then param=90 else param=$1 fi df -kl | grep... (1 Reply)
Discussion started by: collie
1 Replies

4. Shell Programming and Scripting

blanks in file name

I have a file with a list of filenames. I want to work loopwise through the file and operate on each of the listed files. Normally I'd do something like: for file in `cat $mydir/file-list` do echo $file >> $mydir/my.log cp $mydir/$file $newdir done the problem is that my... (1 Reply)
Discussion started by: LisaS
1 Replies

5. Programming

Blanks vs: Nulls

I'm relatively new to Pro*C programming. In the following example: char name; EXEC SQL SELECT 'John Doe' INTO :name FROM DUAL; "John Doe" is in positions 0-7, blanks in 8-19, and a null in 20. I would really prefer the null to be in position 8 and I don't care what's after that. I wrote a... (1 Reply)
Discussion started by: ebock
1 Replies

6. Shell Programming and Scripting

moving a file having blanks in its name

Hi , i need to write a simple to script in KSh to move some files , but these files have spaces in there name, resulting in error in transfering eg i have following files 30222_Deal Ticket_20071227203.csv 30222_Deal Ticket_20071227204.csv 30222_Deal Ticket_20071227205.csv and i want to... (7 Replies)
Discussion started by: Anand28
7 Replies

7. Shell Programming and Scripting

Replace blanks with | (pipe)

Hello, I'm trying to replace the first x number of spaces in a line with a |. Right now I'm using a very inefficient syntax to accomplish the task and was looking to simplify it. I have several cases were the pipes need to replace just the first space on the line, which I did a simple... (11 Replies)
Discussion started by: bd_joy
11 Replies

8. Shell Programming and Scripting

Remove multiple blanks

Hi, I have data as below And I want output as Thanks (5 Replies)
Discussion started by: Anjan1
5 Replies

9. AIX

Screen blanks when exiting vi and more

I have just installed AIX 7.1 on a new system, and find that it displays the same annoying behaviour the you find in Linux: In an xterm, when you quit vim or less, the file listed in the terminal window is blanked out and replaced with whatever was there before. In vim there is a couple of... (12 Replies)
Discussion started by: jandersen
12 Replies

10. Shell Programming and Scripting

Leading blanks

Hi Ich have a list as follows 73 5 100 45 81 4 and I would like to have an output (on screen) like that 73 5 100 45 81 4 (6 Replies)
Discussion started by: lazybaer
6 Replies
DUMMY-UPS(8)							    NUT Manual							      DUMMY-UPS(8)

NAME
dummy-ups - Driver for multi-purpose UPS emulation NOTE
This man page only documents the specific features of the dummy-ups driver. For information about the core driver, see nutupsdrv(8). DESCRIPTION
This program is a multi-purpose UPS emulation tool. Its behavior depends on the running mode: Dummy Mode dummy-ups looks like a standard device driver to upsd(8) and allows one to change any value for testing purposes. It is both interactive, controllable through the upsrw(1) and upscmd(1) commands (or equivalent graphical tool), and batchable through script files. It can be configured, launched and used as any other real driver. This mode is mostly useful for development and testing purposes. Repeater Mode dummy-ups acts as a NUT client, simply forwarding data. This can be useful for supervision purposes. This can also allow some load sharing between several UPS instances, using a point-to-point communication with the UPS. IMPLEMENTATION
The port specification depends on the running mode, and allows the driver to select the right mode. Dummy Mode Port is a definition file name for dummy-ups. This can either be an absolute or a relative path name. In the latter case the NUT sysconfig directory (ie /etc/nut, /usr/local/ups/etc, ...) is prepended. For instance: [dummy] driver = dummy-ups port = evolution500.dev desc = "dummy-ups in dummy mode" This file is generally named "something.dev". It contains a list of all valid data and associated values, and has the same format as an upsc(8) dump (<varname>: <value>). So you can easily create definition files from an existing UPS using "upsc > file.dev". It can also be empty, in which case only a basic set of data is available: device., driver., ups.mfr, ups.model, ups.status Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution. Since dummy-ups will loop on reading this file, you can dynamically modify it to interact with the driver. This will avoid message spam into your system log files, if you are using NUT default configuration. You can also use the "TIMER <seconds>" instruction to create scheduled events sequences. For example, the following sequence will loop on switching ups.status between "OL", "OB" and "OB LB" every minute: ups.status: OL TIMER 60 ups.status: OB TIMER 60 ups.status: LB TIMER 60 It is wise to end the script with a TIMER. Otherwise dummy-ups will directly go back to the beginning of the file. Repeater Mode Port is the name of a remote UPS, using the NUT form, ie: <upsname>[@<hostname>[:<port>]] For instance: [repeater] driver = dummy-ups port = ups@hostname desc = "dummy-ups in repeater mode" INTERACTION
Once the driver is loaded in dummy mode, you can change any variables, except those of the driver.* and server.* collections. You can do this by either editing the definition file, or use the upsrw(1) and upscmd(1) commands. Note that in simulation mode, new variables can be added on the fly, by adding these to the definition file. Conversely, if you need to remove variable (such as transient ones, like ups.alarm), simply update these by setting an empty value. As a result, they will get removed from the data. In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values. BACKGROUND
This driver was written in one evening to replace the previous dummycons testing driver. It was too limited and required to work from a terminal to interact. dummy-ups is useful for NUT client development, and other testing purpose. It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework. It now offers a repeater mode. This will help in building the Meta UPS approach, which allows one to build a virtual device, composed of several other devices (either UPS, PDUs). BUGS
Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition. AUTHOR
Arnaud Quette SEE ALSO
upscmd(1), upsrw(1), ups.conf(5), nutupsdrv(8) Internet Resources: The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ Network UPS Tools 05/21/2012 DUMMY-UPS(8)
All times are GMT -4. The time now is 10:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy