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 just figured out which command's the culprit. It seemed that the tcpdump doesn't play nicely with the stdout when combined with a pipe. Although I still don't know why yet as I am currently not in the mood to read the info and man pages this late.
I had to run three command executions to get the result I wanted. Here's the code in case you're wondering:
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)