View Single Post
Posts: 99 | Thanked: 65 times | Joined on Jan 2008 @ Finland
#2
Originally Posted by szopin View Post
but real-time output doesn't:

airodump-ng wlan0 | sed -f list (no substitution takes place)

Can this be achieved with sed?
This doesn't have anything to do with sed. sed cannot edit your data if it doesn't get it. Instead, this has everything to do with output buffering. Try the following to commands (also without pipe to sed) and you'll iunderstand what I mean.

Code:
perl -e '$| = 0; foreach (1..5) { print "$_\n"; sleep(1); }' | sed 's/2/XYZZY/; s/4/foobar/'
perl -e '$| = 1; foreach (1..5) { print "$_\n"; sleep(1); }' | sed 's/2/XYZZY/; s/4/foobar/'
In other words, you'll have do disable output buffering from airodump-ng or whatever application you use to generate the data.

Last edited by wnd; 2011-11-23 at 20:11. Reason: lets only run for five seconds
 

The Following 3 Users Say Thank You to wnd For This Useful Post: