Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To merge a few lines to 1 line Post 302485708 by streddy on Thursday 6th of January 2011 02:55:15 AM
Old 01-06-2011
doesnt work
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing end of line to merge multiple lines

I'm sure this will be an easy question for you experts out there, but I have been searching the forum and working on this for a couple hours now and can't get it right. I have a very messy data file that I am trying to tidy up - one of the issues is some records are split into multiple lines: ... (4 Replies)
Discussion started by: tink
4 Replies

2. Shell Programming and Scripting

merge multi-lines into one line

Hi, Can anyone help me for merge the following multi-line logs( the black lines) which beginning with time: into one line. For the line with "-", it needs to be deleted. Please see the red color line. ######################################### time: 20080817073334 dn: uid=ok,ou=nbt... (3 Replies)
Discussion started by: missyou
3 Replies

3. Shell Programming and Scripting

Merge multi-lines into one single line

Hi, Can anyone help me for merge the following multi-line log which beginning with a number and time: into one line. For each line need to delete the return and add a space. Please see the red color line. *****Original Log*****... (4 Replies)
Discussion started by: happyday
4 Replies

4. Shell Programming and Scripting

Help on Merge multi-lines into one single line

Hello, Can anyone let me know how to use Perl script to Merge following multi-lines into one single line... ***** Multi-line***** FILE_Write root OK Tue Jul 01 00:00:00 2008 cl_get_path file descriptor = 1 FILE_Write root OK ... (5 Replies)
Discussion started by: happyday
5 Replies

5. Shell Programming and Scripting

merge lines into single line based on symbol \t

The symbols are \t and \t\t (note: not tab) If the line starts with \t merge them into a single line upto symbol \t\t \t\t to end and start new line I able to join in a single line but not ending at \t\t and I completely confused help would be appreciated:b::D Input \ta tab XXXXXXXXXX \te... (5 Replies)
Discussion started by: repinementer
5 Replies

6. UNIX for Advanced & Expert Users

Merge a group of lines into single line

Hi Everybody, Below are the contents of the a text file .., SN = 8 MSI = 405027002277133 IKVALUE = DE6AA6A11D42B69DF6398D44B17BC6F2 K4SNO = 2 CARDTYPE = SIM ALG = COMP128_3 SN = 8 MSI = 405027002546734 IKVALUE = 1D9F8BAA73973D8FBF8CBFB01436D822 K4SNO = 2 CARDTYPE = SIM ALG =... (8 Replies)
Discussion started by: prasanth_babu
8 Replies

7. Shell Programming and Scripting

Merge multiple lines to one line when line starts with and ends with

example: comment Now_TB.table column errac is for error messages 1 - first 2 - second 3 -third ; in this example I need to be able to grab the comment as first word and ; as the last word and it might span a few lines. I need it to be put all in one line without line breaks so I can... (4 Replies)
Discussion started by: wambli
4 Replies

8. Shell Programming and Scripting

Merge multiple lines in one line

Hi guys, So i have a input file with several sequences aligned (fasta) >NC_005930 241 bp MNMINIFIINNIFDQFIPVKLSIFSLTSVGSIIA LSWVWINTKTHWAISRSNTP-SLLLNSL WTLLITNL-NEKTNPWAPWLFSLFLLCFSFNIMSLI-PYTF-SQ TSHLSFTFGLSLPIWIMVNIAGFKNNWKKKISHLLPQGTPIYLVPVMII IETISLFIQPLTLGFRLGANLLAGHLLIFLCSCTIWE... (6 Replies)
Discussion started by: andreia
6 Replies

9. UNIX for Dummies Questions & Answers

How to merge every n lines into one line?

I want to merge every 16 lines into one line, how can I do that? My file looks like below: 0 . 2 2 . 0 0 . 0 0 . 0 0 . 0 0 0 0 0 (2 Replies)
Discussion started by: ml4me
2 Replies

10. Shell Programming and Scripting

Merge multiple lines into a single line

Hi all, I'm relatively new to scripting, I can do pretty basic things. I have a daily log file that looks like: timestamp=2017-06-28-01.01.35.080576; event status=0; userid=user1; authid=user1; application id=10.10.10.10.11111.12345678901; application name=GUI; ... (29 Replies)
Discussion started by: dwdnet
29 Replies
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)
All times are GMT -4. The time now is 12:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy