Hello,
I have a variable that displays the following results from a JVM....
1602100K->1578435K
I would like to collect the value of 1578435 which is the value after a garbage collection. I've tried the following command but it looks like I can't get the > to work. Any suggestions as... (4 Replies)
Hi all
I want to do a simple substitution in awk but I am getting unexpected output. My function accepts a time and then prints out a validation message if the time is valid. However some times may include a : and i want to strip this out if it exists before i get to the validation. I have shown... (4 Replies)
Hi there!
I am really enjoying working with sed. I am trying to come up with a sed command to replace some occurrences (not all) in the same line, for instance:
I have a command which the output will be:
200.300.400.5 0A 0B 0C 01 02 03
being that the last 6 strings are actually one... (7 Replies)
Hi,
I tried to adapt bartus's solution to my problem, without success. I want to replace all the occurences of this:
with:
, where something can contain an arbitrary number of balanced parens and brakets.
Any ideas ?
Best, (1 Reply)
I must design a UNIX script to monitor files whose size is over a threshold of 5 MB in a specific UNIX directory
I meet a problem during the for loop in my script. Some file names contain spaces.
ls -lrt | awk '$5>=5000000 && length($8)==5 {gsub(/ /,"_",$9); print};'
-rw-r--r-- 1 was61 ... (2 Replies)
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Hi,I have 2 files master.txt & reference.txt as shown below & i require o/p as mentioned in file 3 using awk but content is not replacing properlymaster.txt:... (15 Replies)
Hi I have a source file that looks like
a,b,c,d,e,f,g,h,t,DISTI(USD),MSRP(USD),DIST(EUR),MSRP(EUR),EMEA-DISTI(USD),EMEA-MSRP(USD),GLOBAl-DISTI(USD),GLOBAL-MSRP(USD),DISTI(GBP), MSRP(GBP)
I want to basically change MSRP(USD) to MSRP,USD and DIST(EUR) to DIST,EUR and likewise for all i'm using... (3 Replies)
Hi Forum.
I'm trying to cleanup the following data elements (To remove any occurences of commas and any extra spaces) while preserving the <TAB> delimiter using awk gsub but I have not been successful.
Original Data:
4365 monte des source rue,, ,<TAB>trevost<TAB>QC
Desired Data:... (1 Reply)
Discussion started by: pchang
1 Replies
LEARN ABOUT SUSE
powerd
POWERD(8) System Manager's Manual POWERD(8)NAME
powerd - UPS monitoring daemon
SYNOPSIS
/sbin/powerd [tty]
DESCRIPTION
powerd monitors the serial port connected to an UPS device and will perform an unattended shutdown of the system if the UPS is on battery
longer than a specified number of minutes. powerd needs to watch a tty with modem control properties. Please refer to the powerd documen-
tation for further information.
powerd also has the capabilities of notifying other clients on the network that may have a UPS but not be connected to the serial line that
there is a power outage, and id configured through the powerd.conf file
CONFIGURATION FILE
Here is the configuration format:
Lines beginning with '#' are ignored.
MODE <mode>
specifies the mode the UPS should be in. Valid arguements are MONITOR and PEER MONITOR being the mode to actually watch a UPS serial
port, and PEER being to listen for a connection from a machine in MONITOR mode
MONITOR <device>
Specifies which device to monitor while in MONITOR mode. Specify an actual device file. Example: /dev/ttyS0
POWERFAIL <line> <high|low>
Specifies which lines on the serial ports indicate that the power is out. Valid arguements are DCD, CAR, CTS, and RNG. Also specify
if the line being HIGH or LOW indicates a power failure.
Since most people may not know this arguement, Please use the enclosed upsdetect program to automatically find this line.
NOTIFY <hostname[:port]> <password>
Specified in MONITOR mode to notify a client running in PEER mode. Specify the hostname of the machine, and optional port the daemon
is running on, And the password as specified by their LISTEN command. See below for more details.
LISTEN <hostname> <password>
Specified in PEER mode, specifies a hostname that is allowed to notify us of when the power is out, and the password they shall give
us to authenticate themselves. The 2 passwords should match on the MONITOR mode machines NOTIFY password, and the PEER modes LISTEN
password.
LISTENPORT <port>
Specified in PEER mode, specifies the port that powerd should listen on. If you use this arguement, powerd shall not default to
using port 532, and the machine in MONITOR mode must specify the port you use in their NOTIFY command.
DELAY <delayinseconds>
Specifies how many seconds before notifying init of a power outage. Note that this doesnt mean that the system will shut down in
that many seconds, as it depends on how init is configured. Init usually issues a 2 min shutdown.
USER <username>
Specifies which username to drop to from root. The program will reobtain root access only when it needs to, Like when notifying init
that the power is out. This is simply a security feature, and not needed for powerd to operate. Note: powerd must still be run ini-
tially as root. It will then drop to the user if, and only if, a username is specified.
ARGUMENTS
None: Please use the configuration file /etc/powerd.conf which can be generated with detectups. See detectups(8) for more information
FILES
/etc/powerd.conf powerd configuration file
/etc/powerstatus indicates line power status
/etc/inittab init is what actually issues the shutdown
SEE ALSO powerd(8), shutdown(8), wall(1), init(8), inittab(5).
AUTHOR
James Brents <James@nistix.com> (with parts of this man page borrowed from all over the Linux community)
POWERD(8)