Toon posts:

[TCL] chmod file in tcl script aanroepen?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik heb een script dat automatisch een .log file maakt elke dag.
Maar ik wil dat ie die log ook automatisch chmod 777 doet als ie hem maakt.
Hoe moet dat?

stukje van script:
code:
1
2
3
4
5
6
7
8
9
10
proc pub_log {nick uhost handle channel arg} {
  global log_chans
  if {![test_chan $channel]} { return; }

  set stripped_arg [strip $arg]
  set file [open $channel.[strftime %Y%m%d].log a]
  set ttime "\\[[strftime %H:%M:%S]\]"
  puts $file "$ttime <$nick> $stripped_arg"
  close $file
}

  • Grum
  • Registratie: Juni 2001
  • Niet online
gewoon chmod aanroepen of een syscall met chmod ?

  • wasigh
  • Registratie: Januari 2001
  • Niet online

wasigh

wasigh.blogspot.com

chmod 777 [file] ?

  • 2P
  • Registratie: November 2001
  • Laatst online: 07-09 10:23

2P

:wq

code:
1
exec chmod 777 $file

het kan zijn dat je het hele path moet opgeven vor chmod.