[solved]Real time parsing/substitution with sed?
Not sure if this is possible with sed, but after a bit of googling I believe this is the right tool. I am trying to replace MAC addresses of my devices with human-friendly names. I created a file with 's/MAC/Laptop/g' lines and for cat it works:
cat file.csv | sed -f list (this replaces mac addresses as expected) but real-time output doesn't: airodump-ng wlan0 | sed -f list (no substitution takes place) Can this be achieved with sed? |
Re: Real time parsing/substitution with sed?
Quote:
Code:
perl -e '$| = 0; foreach (1..5) { print "$_\n"; sleep(1); }' | sed 's/2/XYZZY/; s/4/foobar/' |
Re: [solved]Real time parsing/substitution with sed?
Courtesy of Reddit user xaoq:
airodump-ng wlan0 2>&1 | sed -f list.txt explanation: airodump-ng apparently dumps data into stderr, not stdout. Hence the redirect stderr -> stdout. |
Re: [solved]Real time parsing/substitution with sed?
Quote:
|
Re: [solved]Real time parsing/substitution with sed?
@wnd,
Still. Your reply was spot on, at least in the general case. |
All times are GMT. The time now is 01:41. |
vBulletin® Version 3.8.8