07-05-2011
@ctsgnb:
I think you forgot a closing paren on line 3, and I think he wants '-w 44', not '-w 35', but other than that I think it should work.
This User Gave Thanks to Morgan Greywolf For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am new to scripting. I need a script to sort and the records in a file and then split them into different files.
For example, the file is:
H1......................
H2......................
D2....................
D2....................
H1........................... (15 Replies)
Discussion started by: Sunitha_edi82
15 Replies
2. Shell Programming and Scripting
Hi, I am trying to parse a very long record in a text file into multiple records by checking ADD, DELETE, or MODIFY field value in a shell script.
Input
# File name xyz.txt
ADD|N000|8015662|DELETE|N001|9915662|MODIFY|N999|85678
Output
ADD|N000|8015662|
DELETE|N001|9915662|... (8 Replies)
Discussion started by: naveed
8 Replies
3. Shell Programming and Scripting
Hi,
I am creating a script to do a find and replace single/multiple lines in a file with any number of lines.
I have written a logic in a script that reads a reference file say "findrep" and populates two variables $FIND and $REPLACE
print $FIND gives
Hi How r $u
Rahul()
Note:... (0 Replies)
Discussion started by: r_sarnayak
0 Replies
4. Shell Programming and Scripting
Hi All,
I have a *.csv files in a die /pro/lif/dow, (pipe delimiter file), these files are having 8 columns and 6 column(CDR_LOGIC) records are populated as below, I need to incorporate the below logic in all the *.csv files.
11||:ColumnA||:ColumnB
123||:ColumnA
IIF(:ColumnA = :ColumnC then... (6 Replies)
Discussion started by: shruthidwh
6 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
6. UNIX for Dummies Questions & Answers
Hi Friends,
source
....
col1,col2,col3
a,b,1;2;3
here colom delimeter is comma(,).
here we dont know what is the max length of col3 means now we have 1;2;3 next time i will receive 1;2;3;4;5;etc...
required output
..............
col1,col2,col3
a,b,1
a,b,2
a,b,3
please give me... (5 Replies)
Discussion started by: bab.galary
5 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to split a record into multiple records based on a value.
Input.txt
"A",1,0,10
"B",2,0,10,15,20
"C",3,11,14,16,19,21,23
"D",1,0,5
My desired output is:
"A",1,0,10
"B",2,0,10
"B",2,15,20
"C",3,11,14
"C",3,16,19
"C",3,21,23 (4 Replies)
Discussion started by: kmsekhar
4 Replies
8. Shell Programming and Scripting
I need to make one record to multiple records based on occurence column in the record and change the date.For example below first record has 5 ,so need to create 5 records from one and change the date to 5 months.Occurence can be any number.
I am unable to come with a script.Can some one help
... (5 Replies)
Discussion started by: traininfa
5 Replies
9. Shell Programming and Scripting
Hello All,
I have a large file, more than 50,000 lines, and I want to split it in even 5000 records. Which I can do using
sed '1d;$d;' <filename> | awk 'NR%5000==1{x="F"++i;}{print > x}'Now I need to add one more condition that is not to break the file at 5000th record if the 5000th record... (20 Replies)
Discussion started by: ibmtech
20 Replies
10. Shell Programming and Scripting
Hi,
I have one tab delimited file which is having multiple store_ids in first column seprated by pipe.I want to split the file on the basis of store_id(separating 1st record in to 2 records ).
I tried some more options like below with using split,awk etc ,But not able to get proper output. can... (1 Reply)
Discussion started by: jaggy
1 Replies
LEARN ABOUT DEBIAN
netsend
NETSEND(1) netsend NETSEND(1)
NAME
netsend - a speedy filetransfer and network diagnostic program
SYNOPSIS
netsend [OPTIONS] PROTOCOL MODE { COMMAND | HELP }
DESCRIPTION
PROTOCOL
Protocol is one of
tcp, udp, udplite, dccp, sctp or tipc.
When using tipc, you must also specify a socket type, e.g. netsend tipc MODE -t SOCK_STREAM.
MODE
Mode is either receive or transmit.
OPTIONS
-r Nn,Nd,Nm,Nf
Round trip probes options:
Nn - Number of iterations of round trip probes. Default is to perform 10 attempts.
Don't set to less then 5 because measurement results will not very predicating.
Nd - Size of rtt payload. This is the number of bytes piggybacking (plus the
netsend rtt header). Default is 500 byte, maybe your mtu minus netsend header
minus protocol header (tcp, udp) will better fit for your needs.
Nm - for the round trip time probes netsend calculates a deviation. With this
flag you can adjust the filter. Default is 4. Lower values drain more probes
out, so be carefully with this option.
For example: if you have measured rtt probes of 4, 5, 5, 6 and 15 ms. The
average is 7. Covariance is 16.4 and deviation is 4.04. If you select 2 here as
the multiplier, then you filter all rtt probes with higher values then 8.08 (for
this example you filer 15ms out).
This will help to discard some nonesense probes who are evoked through cold code
paths (cache misses, page faults, ...) or network anomalies. Use this option
carefully!
-f forces to don't perform rtt probes but take N milliseconds as average value. With
this option you can figure out the behaviour of satelite links (e.g you say -D500f)
-b
followed by a number: sets read/write buffer size to use. Default is 8192 for read/write and
size_of_file_to_send for mmap/sendfile.
-m
followed by a memadvise(2) option: normal, sequential, random, willneed, dontneed, noreuse.
-p
followed by a number: set TCP/UDP/DCCP/SCTP port to use. Default is 6666.
-P
followed by scheduling policy: sched_rr, sched_fifo, sched_batch or sched_other
-s
followed by a setsockopt(2) optname and optval. netsend maps setsockopt levels and
optlen internally. running 'netsend -s list' will print a list of all setsockopt
optnames currently recognized by netsend.
-T
followed by either human or machine: sets output format
-u
followed by the transmit function to use. One of sendfile, mmap, splice or rw.
When not specified, rw (read/write) is used.
Note that not all protocols support all transfer methods, e.g. TIPCs connectionless sockets (SOCK_RDM and SOCK_DGRAM)
do not support the sendfile system call. Also, the amount of data that can be sent in a single operation may be limited
by the network protocol used.
EXAMPLES
Listen for incoming SCTP connections, incoming data goes to stdout:
./netsend -T human -v stressful sctp receive
Send file largefile via TCP with output in machine parseable format:
./netsend -T machine tcp transmit largefile host.example.org
Receive data via TCP with MD5SIG from peer 10.0.0.1:
./netsend tcp transmit -C largefile ffff::10.0.0.1 ./netsend tcp receive -C ffff::10.0.0.1
EXIT STATUS
netsend returns a zero exist status if it succeeds. Non zero is returned in case of failure. Following failure codes are implemented:
0 - succeed
1 - failure in memory handling
2 - command line option error
3 - failure which fit in any categories
4 - network error
5 - failure in netsend header (maybe corrupted hardware)
6 - netsend internal error (should never happen[tm])
AUTHOR
Hagen Paul Pfeifer
Florian Westphal
SEE ALSO
http://netsend.berlios.de
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 132:
You forgot a '=back' before '=head1'
You forgot a '=back' before '=head1'
You forgot a '=back' before '=head1'
perl v5.10.0 netsend NETSEND(1)