title: Setting a variable value as string having [] square parentheses
body: <p>I am trying to write a file (file.txt) through my tcl script having following contents.</p>
  
  <pre><code>$ cat file.txt
  create_library_domain TIMING
  set_attribute library ./sc9mc.lib [find /libraries -library_domain TIMING]
  exit
  </code></pre>
  
  <p>Simple strings is fine, they can be double quoted and passed as a variable to put command, but string with braces are not stored in variable: <code>[find /libraries -library_domain TIMING]</code> I tried escaping it using <code>\</code> but that also didn't work for me.</p>
  
  <p>Code:</p>
  
  <pre><code>proc rcRun {} {
      type_run
      global rundir ENTRYfilename curDIR typep
      set rc_entry "create_library_domain TIMING"
      set attr "set_attribute library"
      set evt "[find /libraries -library_domain TIMING]"
      set rd "exit"
      set cmd [concat $attr $ENTRYfilename $evt]
      cd $rundir
      set filename rc.cmd 
      set fileId  [open $filename "w"]
      puts $fileId $rc_entry $cmd $rd
      close $fileId
  }
  </code></pre>
  
  <p>Please suggest a solution.</p>