Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-14-2008, 02:36 PM   #1
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Rep: Reputation: 32
How do I insert a string to command iwconfig key ...


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?


P.S. This is more of a learning exercise for me than something I plan to do permanently.
Old 08-14-2008, 02:42 PM   #2
Senior Member
Registered: Jun 2005
Location: England
Distribution: SLED, openSUSE
Posts: 1,055

Rep: Reputation: 180Reputation: 180

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kdeprintfax - how to insert delays in dial string? celem Linux - Software 1 01-24-2007 12:35 PM
howto insert a string kscott121 Linux - Software 6 12-26-2006 03:50 PM
Insert a string to Syslog? Ransak Linux - Software 4 10-26-2006 03:51 AM
how to keep iwconfig encryption key odysseus.lost Linux - Wireless Networking 7 09-04-2005 03:10 PM
insert string with sed greg108 Programming 7 02-18-2005 01:11 PM

All times are GMT -5. The time now is 09:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration