I'm pretty stumped, and I don't know why I am not able to redirect the output to the 'graphme' file with the command below in Fedora 18.
In case you're wondering, I was following the example from the Graphing Initial Sequence Numbers section in Linux Administration: A Beginner's Guide 5th Edition with a little modification as I only wanted to get the first syn value from the tcpdump output.
I'm currently using tcpdump version 4.3, and perl version 5.16.2. I don't know if the version makes a difference here. I would appreciate an explanation why I couldn't redirect the output to the file but was able to redirect it to another tty or current terminal using '> /dev/tty2'.
Thanks in advance for your help.
EDIT: Since there is no response, I thought this may help those who may be afraid to execute the above command, which is pretty harmless since I was only capturing packets. This is the output from the `tcpdump -l -n -t "tcp[13] == 18"' command:
When I piped it to perl, I expected to extract the following output from the above command:
Last edited by ConcealedKnight; 02-14-2013 at 11:43 PM..
I'm using the fabulous perl. I need a way to tell when a piped call to "open" has completed. Can I do this with a command like <ShellPipe> ??
Reason behind this:
I'm trying to write a backup script in perl! This script will download a certain file from my web server, to my computer.
Now,... (0 Replies)
Hi,
I haven't done this for awhile, and further, I've never done it in perl so I appreciate any help you can give me.
I have a file of lines, each with 5 data points that look like this:
AB,N,ALLIANCEBERNSTEIN HLDNG L.P,AB,N
ALD,N,ALLIED CAPITAL CORPORATION,ALD,N
AFC,N,ALLIED CAPITAL... (4 Replies)
hi
i have a script named mount.sh under the location /data/scripts/ in my aix box
i want this script this to be run everyday morning at 04:45 AM and the output of the script should be piped to a file
how to do this ? (3 Replies)
How can I insert the command executed on the shell into the first line of my output file?
For example if I execute;
zcat *.gz |grep “User5501” > users.out
How can I make my users.out look like;
zcat *.gz |grep “User5501” > users.out
User5501 PA
User5501 UA
User5501 ZA... (3 Replies)
Version Info
+++++++++++++++
RHEL 5.4
Since ls command lists file sizes in Bytes which can be long I use du command like below.
I have run the du command for the below files as shown below.
But I want pipe this output to ls command just to see the modified timestamp for these files. ... (7 Replies)
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Hi all,
I am having a slight issue updating a file using perl from the command line I need some help with.
The item is:
DATA_FILE_TYPE=FULL
When I run the below command
/usr/bin/perl -p -i -e "s/DATA_FILE_TYPE=/DATA_FILE_TYPE=APPEND/g" processfile.cfg
It looks to be... (2 Replies)
i need to do something like this:
script.sh
#!/bin/sh
echo "hello"
echo "My First name is John"
echo "My Last name is Smith"
echo "I am here to save you a lot of work"
sed -n 4,5p $0
i dont want to run the script. i just want to pull out specific line from it. so the logic here... (5 Replies)
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Hi,
I would like use the output of my cut command as a variable in my following awk command. Here's what I've written.
cut -f1 info.txt | awk -v i=xargs -F'' '{if($6 == $i) print $20}' summary.txt
Where obviously the 'xargs' doesn't do what I want. How can I pass my cut result to my awk... (3 Replies)
Discussion started by: heyooo
3 Replies
LEARN ABOUT NETBSD
ipresend
IPRESEND(1) General Commands Manual IPRESEND(1)NAME
ipresend - resend IP packets out to network
SYNOPSIS
ipresend [ -EHPRSTX ] [ -d <device> ] [ -g <gateway> ] [ -m <MTU> ] [ -r <filename> ]
DESCRIPTION
ipresend was designed to allow packets to be resent, once captured, back out onto the network for use in testing. ipresend supports a num-
ber of different file formats as input, including saved snoop/tcpdump binary data.
OPTIONS -d <interface>
Set the interface name to be the name supplied. This is useful with the -P, -S, -T and -E options, where it is not otherwise possi-
ble to associate a packet with an interface. Normal "text packets" can override this setting.
-g <gateway>
Specify the hostname of the gateway through which to route packets. This is required whenever the destination host isn't directly
attached to the same network as the host from which you're sending.
-m <MTU>
Specify the MTU to be used when sending out packets. This option allows you to set a fake MTU, allowing the simulation of network
interfaces with small MTU's without setting them so.
-r <filename>
Specify the filename from which to take input. Default is stdin.
-E The input file is to be text output from etherfind. The text formats which are currently supported are those which result from the
following etherfind option combinations:
etherfind -n
etherfind -n -t
-H The input file is to be hex digits, representing the binary makeup of the packet. No length correction is made, if an incorrect
length is put in the IP header.
-P The input file specified by -i is a binary file produced using libpcap (i.e., tcpdump version 3). Packets are read from this file
as being input (for rule purposes).
-R When sending packets out, send them out "raw" (the way they came in). The only real significance here is that it will expect the
link layer (i.e. ethernet) headers to be prepended to the IP packet being output.
-S The input file is to be in "snoop" format (see RFC 1761). Packets are read from this file and used as input from any interface.
This is perhaps the most useful input type, currently.
-T The input file is to be text output from tcpdump. The text formats which are currently supported are those which result from the
following tcpdump option combinations:
tcpdump -n
tcpdump -nq
tcpdump -nqt
tcpdump -nqtt
tcpdump -nqte
-X The input file is composed of text descriptions of IP packets.
SEE ALSO ipftest(1), ipsend(1), iptest(1), bpf(4), ipsend(5), tcpdump(8)DIAGNOSTICS
Needs to be run as root.
BUGS
Not all of the input formats are sufficiently capable of introducing a wide enough variety of packets for them to be all useful in testing.
If you find any, please send email to me at darrenr@pobox.com
IPRESEND(1)