Find the answer to your Linux question:
Results 1 to 4 of 4
Ok, im a wifi junkie, thats official, i was wondering, is there a way to make a script, so it does ifconfig eth1 up iwconfig eth1 key XXXXXXXX dhcpcd eth1 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Location
    Tunbridge Wells, England
    Posts
    24

    Creating Scripts for wireless commands


    Ok, im a wifi junkie, thats official, i was wondering, is there a way to make a script, so it does

    ifconfig eth1 up
    iwconfig eth1 key XXXXXXXX
    dhcpcd eth1

    all by typing a single command, such as wifi or wireless? Ive read about VIM, but it looks pretty archaic. Any ideas?

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    just create a file called "wireless" and make it contain:
    Code:
    #!/bin/bash
    ifconfig eth1 up
    iwconfig eth1 key 12345678
    dhcpcd eth1
    then issue:
    Code:
    chmod 755 wireless
    and add the directory where it is located to your path, so you can now just enter:
    Code:
    wireless
    and it will execute.
    -lakerdonald (the other reigning wifi junkie)

  3. #3
    Just Joined!
    Join Date
    Sep 2004
    Location
    Tunbridge Wells, England
    Posts
    24
    do i create the file in /bin/bash? and, when i create the file, do i link it to apllication, or textfile?

  4. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    no
    put it wherever you wish
    and what to you mean link it to application or text file?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •