LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I insert a string to command iwconfig key ... (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-insert-a-string-to-command-iwconfig-key-662820/)

glenn69 08-14-2008 02:36 PM

How do I insert a string to command iwconfig key ...
 
Hello,

I have a file with my WEP key saved to wepkey.txt.

I would like to insert the contents of wepkey.txt to the following command on the command line:

iwconfig wlan0 essid <myessid> key <contents of wepkey.txt>

I tried iwconfig wlan0 key < wepkey.txt, but I receive an error too few arguments

cat < wepkey.txt displays the contents. What am I doing wrong?

Thanks

P.S. This is more of a learning exercise for me than something I plan to do permanently.

arizonagroovejet 08-14-2008 02:42 PM

Try

Code:

iwconfig wlan0 essid <myessid> key `cat wepkey.txt`


All times are GMT -5. The time now is 05:12 PM.