#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    4
    Rep Power
    0

    Need help with unix/tk program


    Hi Experts:

    I don't know if I am posting in the right forum and my apology in advance if I am not.

    I have a tk program that I wrote and would like to run source unix command during my tk program. I tried this
    i.e exec source awk > newfille.sh
    or exec ./awk > newfile.sh

    Both errors out but if I am on an xterm window, and I type this
    source awk > newfile.sh

    and it runs fine.

    What am I doing wrong. Is there a tk command or unix command that tcl/tk understand? Your help is appreciated.

    Thanks,

    frywonton
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,481
    Rep Power
    1752
    Not sure fully what you are trying to do. It looks like you are wanting to redirect the stdout of a command to a file, but why you are doing so with awk like that is what confuses me - all you'd get, surely, is an error message about usage or a hang waiting on input?
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  4. #3
  5. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,995
    Rep Power
    481

    Possibly relevant similar question answered at this web address


    http://stackoverflow.com/questions/6171977/how-do-you-spawn-application-from-tcl-tk-such-that-its-independant-of-the-parent
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    4
    Rep Power
    0
    Thanks Simon and b49P23TIvg for your reply. What b49P23TIvg provide is what I am trying to do. It turns out I have to make it 755 or else it will not run.

IMN logo majestic logo threadwatch logo seochat tools logo