Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by nsgill

  1. nsgill

    TCL -> Eval/Exec with Environment Variables

    Here is the code i ended up using: puts [regsub -all {\$[A-Z0-9]+} $userInput {$env(&)] junk] puts "First round: $junk" puts "Found: [regsub -all {\(\$} $junk {(} junk2]" puts "Final result: $junk2" Now if the user puts this in the text box...
  2. nsgill

    TCL -> Eval/Exec with Environment Variables

    I am going to look into the 'regsub' command to do the parsing for me. I will basically instruct it to look for '$...' and replace that with '$env(...)' Any tips from the pattern matching gurus out there? =)
  3. nsgill

    TCL -> Eval/Exec with Environment Variables

    The problem with that last post is that i can't count on the user to type in the env variables in a fixed pattern. He/she could type something like these below: someprog -file $PATH/abc/def -file2 $PATH2/ghi someprog $ABC someprog $ABC/file1 so the problem is that i would have to do extensive...
  4. nsgill

    TCL -> Eval/Exec with Environment Variables

    Well the problem with using '$env(CVSROOT)' is the fact that the user will be supplying the envrionment variables from the GUI. So i can't expect the user to type in the '$env()' around any env the want to use. Lets say i want to make it simpler for the user so they can just pass in '$CVSROOT'...
  5. nsgill

    TCL -> Eval/Exec with Environment Variables

    Thanks for the tip. But it still does not work for me. Lets say I want to issue an 'ls' command on a directory that is defined in this env variable: "$CVSROOT" I am trying it this way: catch {exec ls {$CVSROOT}} retval puts "Val: $retVal" I get this output: Val: ls...
  6. nsgill

    TCL -> Eval/Exec with Environment Variables

    Ok. I have a problem in TCL that I hope someone here can help me out with. The problem is with using the 'exec/eval' command. I want to be able to execute a command where the command involves an environment variable. For example; lets say I want to say echo $PATH the problem is that the user...

Part and Inventory Search

Back
Top