Results 1 to 3 of 3

Thread: bash cd command

  1. #1
    Join Date
    Nov 2006
    Beans
    216

    bash cd command

    hi
    i have been learning tcl tk. i would like to create a script that would open a terminal and in that terminal cd /home/me/level1 and then run wish in the same terminal, i'v tried this several ways and nothing works correctly.


    #!/bin/bash
    #
    #
    #opends a terminal
    gnome-terminal

    #should change to level1 directory
    cd /home/klein/level1

    #should start wish in level1 directory
    wish


    end

  2. #2
    Join Date
    Feb 2011
    Beans
    Hidden!

    Re: bash cd command

    Instead do...

    <pre>
    #!/bin/bash
    gnome-terminal -e "cd /home/klein/level1 && wish"
    </pre>

    or better yet, create a shortcut to gnome-terminal with the parameters as specified above

  3. #3
    Join Date
    Nov 2006
    Beans
    216

    Re: bash cd command

    hi
    down_to_earth_sort_of_guy
    i created a launcher on the desk top and put in the command you gave me but it comes up (There was an error creating the child process for this terminal) doesn't bring up a normal prompt just a blinking courser .

Bookmarks

Posting Permissions

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