#!/bin/ksh
savestr=""
# remove first \t, we don't need it
sed "s/^\\\t//" filename | while read line
do
case "$line" in
\t*) # \t\t line, so print buffer and empty buffer
echo "$savestr"
savestr=""
;;
*) # not \t\t line, so add current line to the buffer
savestr="$savestr$line "
;;
esac
done
# last line
# if file not end \t\t line, then we have some data in buffer, print it
[ "$savestr" != "" ] && echo "$savestr"
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)
Hi,
Can anyone know how to use perl to merge the following multi-line information which beginning with "BAM" into one line. For each line need to delete the return and add a space. Please see the red color line.
******Org. Multi-line)
BAM admin 101.203.57.22 ... (3 Replies)
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)
Hi Guys,
I am new to awk and sed, i am working multiline document, i want to make make that document into SINGLE lines based on occurace of string "dwh".
here's the sample of my problem..
dwh123 2563 4562 4236 1236 78956 12394 4552 dwh192 2656 46536 231326 65652 6565 23262 16625623... (5 Replies)
This is a variation of an earlier post found here:
unixcom/shell-programming-scripting/159821-merge-two-non-consecutive-lines.html
User Bartus11 was kind enough to solve that example.
Previously, I needed help combining two lines that are non-consecutive in a file. Now I need to do the... (7 Replies)
Hello,
I am trying to return a time multiple times from a file that has varying output just before the time instance, i.e.
cat jumped
cat jumped
cat jumped
time = 1.1
cat jumped
cat jumped
time = 1.2
cat jumped
cat jumped
time = 1.3
In this case i would like to output a time.txt... (6 Replies)
I Want to merge multiple lines based on the 1st field and keep into single record.
SRC File:
AAA_POC_DB.TAB1
AAA_POC_DB.TAB2
AAA_POC_DB.TAB3
AAA_POC_DB.TAB4
BBB_POC_DB.TAB1
BBB_POC_DB.TAB2
CCC_POC_DB.TAB6
OUTPUT
-----------------
'AAA_POC_DB','TAB1','TAB2','TAB3','TAB4'... (10 Replies)
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)
Hi,
Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line.
*****Original Log*****
087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;... (3 Replies)
Discussion started by: rajeshlinux2010
3 Replies
LEARN ABOUT DEBIAN
tcpspray
TCPSPRAY(1) General Commands Manual TCPSPRAY(1)NAME
tcpspray - print average throughput for a tcp connection
SYNOPSIS
tcpspray [ -v ] [ -e ] [ -h ] [ -b blksize ] [ -n nblks ]
[ -f filename ] hostname
DESCRIPTION
tcpspray sends data to either the discard or echo TCP service on the specified host and prints the average throughput.
OPTIONS -v Prints a dot for each block sent. Will also print a backspace for each block received in echo mode. Note: the I/O required
for this option will affect the throughput rates.
-e Use the TCP echo service instead of discard (the default) and print throughput rates for both transmission and reception.
-h Print a usage description.
-b blksize Sets the size of a block (the internal buffer) in bytes. Defaults to 1024.
-n nblks Sets the number of blocks to transfer. Defaults to 100.
-f filename Copy the contents of the specified file into the internal buffer (sized by -b option). The buffer is zeroed by default. If
the file is larger than the buffer, only the first blksize bytes will be used. If the file is smaller than the buffer, the
remaining bytes are zeroed.
This option is useful in determining the relationship of the data transferred to throughput. E.g., if data compression is
used on any of the intermediate links comprising the TCP connection, preloading the buffer with a text file will produce
greater throughput than with a file that has already been compressed.
-d delay Sets the time in microseconds to wait between successive buffer transmissions. The default is no delay.
SEE ALSO ping(8), spray(8)AUTHOR
Greg Christy (gmc@quotron.com)
23 October 1991 TCPSPRAY(1)