Hi there
How can i get the result of:
ls /sys/class/net | grep wlan
into a bash variable wX
Thanks.
Hi there
How can i get the result of:
ls /sys/class/net | grep wlan
into a bash variable wX
Thanks.
Hi!
Use the backtick (`) character around the command:
hope that helpsCode:gp@mariachi:~$ wX=`ls /sys/class/net | grep wlan` gp@mariachi:~$ echo $wX wlan0
edit: greenpeace was a little faster =)Code:wX=`ls /sys/class/net | grep wlan`
This is my signature
Pedantic note: it's better to use $( ) rather than backticks: http://mywiki.wooledge.org/BashFAQ/082
As you were!
Thanks fellas
Bookmarks