I am trying to concatenate two lines of iwlist
output. My grep
and sed
commands to remove leading and trailing spaces work fine but I can't get the last sed
statement to remove the \n
to work. What am I missing?
sudo iwlist wlan0 scanning |
grep -e ESSID -e Signal |
sed -e 's/^[ \t]*//;s/[ \t]*$//' |
sed -e 's/dBm\n/dBm /'
The regex works fine in vim
.
No comments:
Post a Comment