2
votes
2answers
134 views

turn off buffering for `hping` in OpenBSD

It would appear that the output from hping is fully buffered when piped to perl for further line-by-line processing, so piping hping to perl doesn't work. hping --icmp-ts example.ca | perl -ne 'if ...
1
vote
1answer
82 views

Pipe not picking up stdout

I am running a java program from a OS X 10.8 bash terminal, and are trying to rederect the output it is producing. However, when either running this throug a pipe, or rederecting it to a file, the ...
1
vote
2answers
210 views

What stream does perf use?

What stream does the perf command use!? I've been trying to capture it with (perf stat -x, -ecache-misses ./a.out>/dev/null) 2> results following http://stackoverflow.com/q/13232889/50305, ...
1
vote
1answer
84 views

Unsure about the behaviour of my script when writing to log file

I have a very simple ksh script and at certain points I want to write to a log file. I use the following commands in two places... print "Directory listing 1:\n" > ${LogFile} ll >> ...
1
vote
2answers
2k views

How can I get vsftpd version into shell variable?

I want to get vsftpd version into shell variable. I can get it to console with ease: # vsftpd -version vsftpd: version 2.2.2 Also I can get a lot of other info into variable: # i=`bash --version ...
5
votes
1answer
1k views

How to send output to both screen and mail?

I use the following to send an email at the end of a script. echo "Script finished on `date`" | /usr/bin/Mail -s "Script complete" "myaccount@myserver.com". However, I want to echo the same message ...
4
votes
2answers
410 views

how to redirect terminal output to multiple log files

I've been trying redirect output to logfiles but should NOT be displayed on terminal, but following command does output both on terminal and in logs. Any ideas are appreciated. (some_cmd | tee -a ...
5
votes
2answers
4k views

tail program output to file in Linux

I know we can use below format to redirect the screen output to a file: $ your_program > /tmp/output.txt However when I used below command, it says "-bash: /home/user/errors.txt: Permission ...