Dear All
I have a file like this
112534554
446538656
444695656
225696966
226569744
228787874
113536566
443533535
222564552
115464656
225445345
225533234
I want to cut the file into different parts where the first two columns are '11' . The first two columns will be either... (3 Replies)
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
Hi,
I need to match lines after a pattern, upto the first blank line.
Searched in web and some forums but coulnt find the answer.
where <restart_step> =
10 -- Execute query
20 -- Write the contents to the Oracle table
30 -- Writing Contents to OUTPUT... (7 Replies)
Hi,
I have a code tag, from which i have the below snippet:
intelrpt.GetCMB_FB type=ODBC>
intelrpt.GetCMB_FB type=SYBASE>
I want the output like:
intelrpt.GetCMB_FB
intelrpt.GetCMB_FB
That is remove the lines starting from WHITESPACE till end.
Please help. I am new to... (7 Replies)
Hi Experts,
Help needed on joining one line above & below to the pattern matched string line.
The input file, required output is mentioned below
Input file
ABCD DEFG5 42.0.1-63.38.31
KKKK iokl IP Connection Available
ABCD DEFG5 42.0.1-63.38.31
... (7 Replies)
i have a file which contains alphanumeric data in every line. what i need is the data after certain pattern. the data after the pattern is not of fixed length so i need the data till the space after the pattern.
Input file:
bfdkasfbdfg khffkf lkdhfhdf pattern (datarequired data not required)... (2 Replies)
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Hi All,
From the below line if we want to display all the text till found pattern dot/. I was trying with the below code but couldn't able
to print text before the pattern. it display texts which is found after pattern.
awk '/assed/{print;getline;print}' file_name | sed 's/^*. *//'
input... (4 Replies)
Hello every,
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
eg
>
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Hello,
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
6 Replies
LEARN ABOUT OPENDARWIN
upsc
UPSC(8) NUT Manual UPSC(8)NAME
upsc - example lightweight UPS client
SYNOPSIS
upsc -l | -L [host]
upsc ups [variable]
upsc -c ups
DESCRIPTION
upsc is provided as a quick way to poll the status of a UPS server. It can be used inside shell scripts and other programs that need UPS
data but don't want to include the full interface.
OPTIONS -l host
List all UPS names configured at host, one name per line. The hostname defaults to "localhost". You may optionally add a colon and a
port number.
-L host
As above, list all UPS names configured at host, including their description provided by the remote upsd(8) from ups.conf(5). The
hostname defaults to "localhost". You may optionally add a colon and a port number to override the default port.
-c ups
Lists each client connected on ups, one name per line.
ups
Display the status of that UPS. The format for this option is upsname[@hostname[:port]]. The default hostname is "localhost".
variable
Display the value of this variable only. By default, upsc retrieves the list of variables from the server and then displays the value
for each. This may be useful in shell scripts to save an additional pipe into grep.
EXAMPLES
To list all variables on an UPS named "myups" on a host called "mybox", with upsd(8) running on port 1234:
$ upsc myups@mybox:1234
battery.charge: 100.0
battery.voltage: 13.9
battery.voltage.nominal: 13.6
. . .
To list the UPSes configured on this system, along with their descriptions:
$ upsc -L
apc: Back-UPS 500
ppro2: Patriot Pro II
To retrieve the status for all UPSes connected to mybox, using Bourne-shell syntax:
$ for UPS in `upsc -l mybox:1234`; do
upsc $UPS ups.status
done
To list clients connected on "myups":
$ upsc -c myups
127.0.0.1
::1
192.168.1.2
DIAGNOSTICS
upsc will either print a list of UPS names, a list of all supported variables and their values on the UPS, or an error message. If you
receive an error, make sure you have specified a valid UPS on the command line, that upsd(8) is really running on the other host and that
no firewalls are blocking you.
HISTORY
Earlier versions of this program used the upsfetch library and UDP sockets to talk to upsd. This version of upsc uses the new upsclient
library, which only talks TCP. This is why upsct no longer exists.
SEE ALSO upsd(8)INTERNET RESOURCES
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/21/2012 UPSC(8)