Find the answer to your Linux question:
Results 1 to 3 of 3
Dear all, I am trying to write a small script which opens an xterm and executes a command. So the script would be xterm -e mycommand -i infile -o outfiel ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2

    xterm and logging ouput

    Dear all,
    I am trying to write a small script which opens an xterm and executes a command.
    So the script would be
    xterm -e mycommand -i infile -o outfiel -f arg3
    the command mycommand asks user for input..
    I would like to get the log of output of mycommand , and i am not been able to do it.
    any ideas??
    I planned to use script for that

    xterm -e 'script mylog ; mycommand -i infile -o outfiel -f arg3'
    but it doesnt work. any help
    cheers,
    cyrs

  2. #2
    Linux Enthusiast KenJackson's Avatar
    Join Date
    Jun 2006
    Location
    Maryland, USA
    Posts
    506
    Try this:
    Code:
    xterm -e script mylog -c "mycommand -i infile -o outfile -f arg3"

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2
    Quote Originally Posted by KenJackson View Post
    Try this:
    Code:
    xterm -e script mylog -c "mycommand -i infile -o outfile -f arg3"
    Thanks a bunch KenJackson..it works.
    -cyrusak

Posting Permissions

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