What is a "busy file? How can i delete in TCL script?

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hi,

I have a tcl script that generate a lot of intermediate files (and
folders). At the last step of my script, I've to clean the working
directory and keep only one or two files.

I have written a proc to clean work dir like this:

proc cleanWorkDir {dir keep1 {keep2 ""}} {
   set here [pwd]
   cd $dir
   if {$keep2 == "" } {
     set keep2 $keep1
   }

   foreach f [glob -nocomplain *] {
     if { ![string equal $f [getOnlyName $keep1] ] && ![string equal
$f [getOnlyName $keep2]] } {
     	file delete -force $f
     }
   }
   cd $here
}


Although it worked on my laptop, but on customer's Linux machine I
always get error message:
ERROR: cannot remove `A/B/.nfs00000000010d28ba00004dfb': Device or
resource busy
    while executing
  "file delete -force $f"
....


Despite of being able to delete the whole folder (Folder "A" in error
message) manually, I don't understand why cannot the TCL script do it!

Can anyone help me solve this?

Thanks,
Ahmad
0
Reply Ahmad 11/4/2010 7:45:44 PM

See related articles to this posting


I have also noticed something.. When the TCL script exits after this
error, and I try to "ls" the ".nsf...." file it complains about, I
don't find it!

What is the .nsf file stands for? Who generates it?

Thanks,
Ahmad


On Nov 4, 12:45=A0pm, Ahmad <ahmad.abdulgh...@gmail.com> wrote:
> Hi,
>
> I have a tcl script that generate a lot of intermediate files (and
> folders). At the last step of my script, I've to clean the working
> directory and keep only one or two files.
>
> I have written a proc to clean work dir like this:
>
> proc cleanWorkDir {dir keep1 {keep2 ""}} {
> =A0 =A0set here [pwd]
> =A0 =A0cd $dir
> =A0 =A0if {$keep2 =3D=3D "" } {
> =A0 =A0 =A0set keep2 $keep1
> =A0 =A0}
>
> =A0 =A0foreach f [glob -nocomplain *] {
> =A0 =A0 =A0if { ![string equal $f [getOnlyName $keep1] ] && ![string equa=
l
> $f [getOnlyName $keep2]] } {
> =A0 =A0 =A0 =A0 file delete -force $f
> =A0 =A0 =A0}
> =A0 =A0}
> =A0 =A0cd $here
>
> }
>
> Although it worked on my laptop, but on customer's Linux machine I
> always get error message:
> ERROR: cannot remove `A/B/.nfs00000000010d28ba00004dfb': Device or
> resource busy
> =A0 =A0 while executing
> =A0 "file delete -force $f"
> ...
>
> Despite of being able to delete the whole folder (Folder "A" in error
> message) manually, I don't understand why cannot the TCL script do it!
>
> Can anyone help me solve this?
>
> Thanks,
> Ahmad

0
Reply Ahmad 11/4/2010 7:54:20 PM

At Thu, 4 Nov 2010 12:54:20 -0700 (PDT) Ahmad <ahmad.abdulghany@gmail.com> wrote:

> 
> I have also noticed something.. When the TCL script exits after this
> error, and I try to "ls" the ".nsf...." file it complains about, I
> don't find it!
> 
> What is the .nsf file stands for? Who generates it?

NFS -- 'Network File System', a UNIX file sharing protocol, originally
invented by Sun Microsystems back in the late 1970's or so. The
".nsf...." file is something created by the NFS software, I think
related to locking.

> 
> Thanks,
> Ahmad
> 
> 
> On Nov 4, 12:45=A0pm, Ahmad <ahmad.abdulgh...@gmail.com> wrote:
> > Hi,
> >
> > I have a tcl script that generate a lot of intermediate files (and
> > folders). At the last step of my script, I've to clean the working
> > directory and keep only one or two files.
> >
> > I have written a proc to clean work dir like this:
> >
> > proc cleanWorkDir {dir keep1 {keep2 ""}} {
> > =A0 =A0set here [pwd]
> > =A0 =A0cd $dir
> > =A0 =A0if {$keep2 =3D=3D "" } {
> > =A0 =A0 =A0set keep2 $keep1
> > =A0 =A0}
> >
> > =A0 =A0foreach f [glob -nocomplain *] {
> > =A0 =A0 =A0if { ![string equal $f [getOnlyName $keep1] ] && ![string equa=
> l
> > $f [getOnlyName $keep2]] } {
> > =A0 =A0 =A0 =A0 file delete -force $f
> > =A0 =A0 =A0}
> > =A0 =A0}
> > =A0 =A0cd $here
> >
> > }
> >
> > Although it worked on my laptop, but on customer's Linux machine I
> > always get error message:
> > ERROR: cannot remove `A/B/.nfs00000000010d28ba00004dfb': Device or
> > resource busy
> > =A0 =A0 while executing
> > =A0 "file delete -force $f"
> > ...
> >
> > Despite of being able to delete the whole folder (Folder "A" in error
> > message) manually, I don't understand why cannot the TCL script do it!
> >
> > Can anyone help me solve this?
> >
> > Thanks,
> > Ahmad
> 
>                                                                                                     

-- 
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                                                                                                           
0
Reply Robert 11/4/2010 8:26:19 PM

Hi Robert,

This is a very nice to know, thank you.

Do you have any idea how can I force delete this kind of files?

Thanks,
Ahmad


On Nov 4, 1:26=A0pm, Robert Heller <hel...@deepsoft.com> wrote:
> At Thu, 4 Nov 2010 12:54:20 -0700 (PDT) Ahmad <ahmad.abdulgh...@gmail.com=
> wrote:
>
>
>
> > I have also noticed something.. When the TCL script exits after this
> > error, and I try to "ls" the ".nsf...." file it complains about, I
> > don't find it!
>
> > What is the .nsf file stands for? Who generates it?
>
> NFS -- 'Network File System', a UNIX file sharing protocol, originally
> invented by Sun Microsystems back in the late 1970's or so. The
> ".nsf...." file is something created by the NFS software, I think
> related to locking.
>
>
>
>
>
> > Thanks,
> > Ahmad
>
> > On Nov 4, 12:45=3DA0pm, Ahmad <ahmad.abdulgh...@gmail.com> wrote:
> > > Hi,
>
> > > I have a tcl script that generate a lot of intermediate files (and
> > > folders). At the last step of my script, I've to clean the working
> > > directory and keep only one or two files.
>
> > > I have written a proc to clean work dir like this:
>
> > > proc cleanWorkDir {dir keep1 {keep2 ""}} {
> > > =3DA0 =3DA0set here [pwd]
> > > =3DA0 =3DA0cd $dir
> > > =3DA0 =3DA0if {$keep2 =3D3D=3D3D "" } {
> > > =3DA0 =3DA0 =3DA0set keep2 $keep1
> > > =3DA0 =3DA0}
>
> > > =3DA0 =3DA0foreach f [glob -nocomplain *] {
> > > =3DA0 =3DA0 =3DA0if { ![string equal $f [getOnlyName $keep1] ] && ![s=
tring equa=3D
> > l
> > > $f [getOnlyName $keep2]] } {
> > > =3DA0 =3DA0 =3DA0 =3DA0 file delete -force $f
> > > =3DA0 =3DA0 =3DA0}
> > > =3DA0 =3DA0}
> > > =3DA0 =3DA0cd $here
>
> > > }
>
> > > Although it worked on my laptop, but on customer's Linux machine I
> > > always get error message:
> > > ERROR: cannot remove `A/B/.nfs00000000010d28ba00004dfb': Device or
> > > resource busy
> > > =3DA0 =3DA0 while executing
> > > =3DA0 "file delete -force $f"
> > > ...
>
> > > Despite of being able to delete the whole folder (Folder "A" in error
> > > message) manually, I don't understand why cannot the TCL script do it=
!
>
> > > Can anyone help me solve this?
>
> > > Thanks,
> > > Ahmad
>
> --
> Robert Heller =A0 =A0 =A0 =A0 =A0 =A0 -- 978-544-6933 / hel...@deepsoft.c=
om
> Deepwoods Software =A0 =A0 =A0 =A0--http://www.deepsoft.com/
> () =A0ascii ribbon campaign -- against html e-mail
> /\ =A0www.asciiribbon.org=A0 -- against proprietary attachments

0
Reply Ahmad 11/4/2010 10:16:08 PM

At Thu, 4 Nov 2010 15:16:08 -0700 (PDT) Ahmad <ahmad.abdulghany@gmail.com> wrote:

> 
> Hi Robert,
> 
> This is a very nice to know, thank you.
> 
> Do you have any idea how can I force delete this kind of files?

I don't think you can OR should.

> 
> Thanks,
> Ahmad
> 
> 
> On Nov 4, 1:26=A0pm, Robert Heller <hel...@deepsoft.com> wrote:
> > At Thu, 4 Nov 2010 12:54:20 -0700 (PDT) Ahmad <ahmad.abdulgh...@gmail.com=
> > wrote:
> >
> >
> >
> > > I have also noticed something.. When the TCL script exits after this
> > > error, and I try to "ls" the ".nsf...." file it complains about, I
> > > don't find it!
> >
> > > What is the .nsf file stands for? Who generates it?
> >
> > NFS -- 'Network File System', a UNIX file sharing protocol, originally
> > invented by Sun Microsystems back in the late 1970's or so. The
> > ".nsf...." file is something created by the NFS software, I think
> > related to locking.
> >
> >
> >
> >
> >
> > > Thanks,
> > > Ahmad
> >
> > > On Nov 4, 12:45=3DA0pm, Ahmad <ahmad.abdulgh...@gmail.com> wrote:
> > > > Hi,
> >
> > > > I have a tcl script that generate a lot of intermediate files (and
> > > > folders). At the last step of my script, I've to clean the working
> > > > directory and keep only one or two files.
> >
> > > > I have written a proc to clean work dir like this:
> >
> > > > proc cleanWorkDir {dir keep1 {keep2 ""}} {
> > > > =3DA0 =3DA0set here [pwd]
> > > > =3DA0 =3DA0cd $dir
> > > > =3DA0 =3DA0if {$keep2 =3D3D=3D3D "" } {
> > > > =3DA0 =3DA0 =3DA0set keep2 $keep1
> > > > =3DA0 =3DA0}
> >
> > > > =3DA0 =3DA0foreach f [glob -nocomplain *] {
> > > > =3DA0 =3DA0 =3DA0if { ![string equal $f [getOnlyName $keep1] ] && ![s=
> tring equa=3D
> > > l
> > > > $f [getOnlyName $keep2]] } {
> > > > =3DA0 =3DA0 =3DA0 =3DA0 file delete -force $f
> > > > =3DA0 =3DA0 =3DA0}
> > > > =3DA0 =3DA0}
> > > > =3DA0 =3DA0cd $here
> >
> > > > }
> >
> > > > Although it worked on my laptop, but on customer's Linux machine I
> > > > always get error message:
> > > > ERROR: cannot remove `A/B/.nfs00000000010d28ba00004dfb': Device or
> > > > resource busy
> > > > =3DA0 =3DA0 while executing
> > > > =3DA0 "file delete -force $f"
> > > > ...
> >
> > > > Despite of being able to delete the whole folder (Folder "A" in error
> > > > message) manually, I don't understand why cannot the TCL script do it=
> !
> >
> > > > Can anyone help me solve this?
> >
> > > > Thanks,
> > > > Ahmad
> >
> > --
> > Robert Heller =A0 =A0 =A0 =A0 =A0 =A0 -- 978-544-6933 / hel...@deepsoft.c=
> om
> > Deepwoods Software =A0 =A0 =A0 =A0--http://www.deepsoft.com/
> > () =A0ascii ribbon campaign -- against html e-mail
> > /\ =A0www.asciiribbon.org=A0 -- against proprietary attachments
> 
>                                                                                                         

-- 
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                                                                                             
0
Reply Robert 11/4/2010 11:56:45 PM

Your script is trying to delete all files in a directory except those 
you specify. It would probably be better to maintain a list of the 
temporary files and just loop through the list at the end deleting them, 
that way you avoid trying to delete other files (like the NFS lock files).

Simon


On 04/11/2010 23:56, Robert Heller wrote:
> At Thu, 4 Nov 2010 15:16:08 -0700 (PDT) Ahmad<ahmad.abdulghany@gmail.com>  wrote:
>
>>
>> Hi Robert,
>>
>> This is a very nice to know, thank you.
>>
>> Do you have any idea how can I force delete this kind of files?
>
> I don't think you can OR should.
>
>>
>> Thanks,
>> Ahmad
>>
>>
>> On Nov 4, 1:26=A0pm, Robert Heller<hel...@deepsoft.com>  wrote:
>>> At Thu, 4 Nov 2010 12:54:20 -0700 (PDT) Ahmad<ahmad.abdulgh...@gmail.com=
>>> wrote:
>>>
>>>
>>>
>>>> I have also noticed something.. When the TCL script exits after this
>>>> error, and I try to "ls" the ".nsf...." file it complains about, I
>>>> don't find it!
>>>
>>>> What is the .nsf file stands for? Who generates it?
>>>
>>> NFS -- 'Network File System', a UNIX file sharing protocol, originally
>>> invented by Sun Microsystems back in the late 1970's or so. The
>>> ".nsf...." file is something created by the NFS software, I think
>>> related to locking.
>>>
>>>
>>>
>>>
>>>
>>>> Thanks,
>>>> Ahmad
>>>
>>>> On Nov 4, 12:45=3DA0pm, Ahmad<ahmad.abdulgh...@gmail.com>  wrote:
>>>>> Hi,
>>>
>>>>> I have a tcl script that generate a lot of intermediate files (and
>>>>> folders). At the last step of my script, I've to clean the working
>>>>> directory and keep only one or two files.
>>>
>>>>> I have written a proc to clean work dir like this:
>>>
>>>>> proc cleanWorkDir {dir keep1 {keep2 ""}} {
>>>>> =3DA0 =3DA0set here [pwd]
>>>>> =3DA0 =3DA0cd $dir
>>>>> =3DA0 =3DA0if {$keep2 =3D3D=3D3D "" } {
>>>>> =3DA0 =3DA0 =3DA0set keep2 $keep1
>>>>> =3DA0 =3DA0}
>>>
>>>>> =3DA0 =3DA0foreach f [glob -nocomplain *] {
>>>>> =3DA0 =3DA0 =3DA0if { ![string equal $f [getOnlyName $keep1] ]&&  ![s=
>> tring equa=3D
>>>> l
>>>>> $f [getOnlyName $keep2]] } {
>>>>> =3DA0 =3DA0 =3DA0 =3DA0 file delete -force $f
>>>>> =3DA0 =3DA0 =3DA0}
>>>>> =3DA0 =3DA0}
>>>>> =3DA0 =3DA0cd $here
>>>
>>>>> }
>>>
>>>>> Although it worked on my laptop, but on customer's Linux machine I
>>>>> always get error message:
>>>>> ERROR: cannot remove `A/B/.nfs00000000010d28ba00004dfb': Device or
>>>>> resource busy
>>>>> =3DA0 =3DA0 while executing
>>>>> =3DA0 "file delete -force $f"
>>>>> ...
>>>
>>>>> Despite of being able to delete the whole folder (Folder "A" in error
>>>>> message) manually, I don't understand why cannot the TCL script do it=
>> !
>>>
>>>>> Can anyone help me solve this?
>>>
>>>>> Thanks,
>>>>> Ahmad
>>>
>>> --
>>> Robert Heller =A0 =A0 =A0 =A0 =A0 =A0 -- 978-544-6933 / hel...@deepsoft.c=
>> om
>>> Deepwoods Software =A0 =A0 =A0 =A0--http://www.deepsoft.com/
>>> () =A0ascii ribbon campaign -- against html e-mail
>>> /\ =A0www.asciiribbon.org=A0 -- against proprietary attachments
>>
>>
>

0
Reply Simon 11/5/2010 10:14:08 AM

On Nov 4, 4:56=A0pm, Robert Heller <hel...@deepsoft.com> wrote:
> At Thu, 4 Nov 2010 15:16:08 -0700 (PDT) Ahmad <ahmad.abdulgh...@gmail.com=
> wrote:
>
>
>
> > Hi Robert,
>
> > This is a very nice to know, thank you.
>
> > Do you have any idea how can I force delete this kind of files?
>
> I don't think you can OR should.
>
>

I agree with Robert that the lock files can't be deleted. The first
question you should have is why are they being created. Is there some
good reason that the files you have created are being locked by a
remote host? If not then I would spend some time figuring what the
heck is going on. Second, the /tmp directory on unix/linux is where
you should be putting all your temporary files. This directory is
cleared when a system is rebooted which will remove any abandoned lock
files. In a large network it is possible for lock files to become
abandoned which is a real headacke because they will prevent
directories from being deleted.

tomk
0
Reply tomk 11/5/2010 4:10:28 PM

On 5 nov, 17:10, tomk <krehbiel....@gmail.com> wrote:
> On Nov 4, 4:56=A0pm, Robert Heller <hel...@deepsoft.com> wrote:
>
> > At Thu, 4 Nov 2010 15:16:08 -0700 (PDT) Ahmad <ahmad.abdulgh...@gmail.c=
om> wrote:
>
> > > Hi Robert,
>
> > > This is a very nice to know, thank you.
>
> > > Do you have any idea how can I force delete this kind of files?
>
> > I don't think you can OR should.
>
> I agree with Robert that the lock files can't be deleted. The first
> question you should have is why are they being created. Is there some
> good reason that the files you have created are being locked by a
> remote host? If not then I would spend some time figuring what the
> heck is going on. Second, the /tmp directory on unix/linux is where
> you should be putting all your temporary files. This directory is
> cleared when a system is rebooted which will remove any abandoned lock
> files. In a large network it is possible for lock files to become
> abandoned which is a real headacke because they will prevent
> directories from being deleted.
>
> tomk

To see the file you should propbaly try
ls -al
This lists all files including hidden ones, under Linux the . before a
filename will hide them from simple ls

You should probably be creating a private tmp directory in /tmp to
keep all your files together then a simple delete of the directory
should clean up easily.


Martyn
0
Reply MSEdit 11/5/2010 5:51:22 PM

* Robert Heller <heller@deepsoft.com>
| > What is the .nsf file stands for? Who generates it?
>
| ... The ".nsf...." file is something created by the NFS software, I
| think related to locking.

Those .nfs files are not related to file locking, but to removed files
on an NFS share which are still open in some application.

See
  https://www.cs.indiana.edu/Facilities/FAQ/General/dotnfs.html
  http://www.unix.com/filesystems-disks-memory/5702-removing-nfs-files.html

HTH
R'
0
Reply Ralf 11/5/2010 6:59:48 PM

@Ahmad

may be one more tip is you can use exception handling if script is
actually aborting without completion where you can use tcl catch
statement for file delete operation and print messages when some cases
it fails as busy etc.
0
Reply SANKY 11/11/2010 1:13:30 PM
comp.lang.tcl 21910 articles. 11 followers. Post

9 Replies
352 Views

Similar Articles

[PageSpeed] 5


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

What is a "busy file? How can i delete in TCL script?
Hi, I have a tcl script that generate a lot of intermediate files (and folders). At the last step of my script, I've to clean the working directory and keep only one or two files. I have written a proc to clean work dir like this: proc cleanWorkDir {dir keep1 {keep2 ""}} { set here [pwd] cd $dir if {$keep2 == "" } { set keep2 $keep1 } foreach f [glob -nocomplain *] { if { ![string equal $f [getOnlyName $keep1] ] && ![string equal $f [getOnlyName $keep2]] } { file delete -force $f } } cd $here } ...

Tcl script hangs on deleting directory from remote machine while works for files
Hi All, As a part of my tcl script, my requirement is i need to delete contents (i.e. files and directories with my login id) from remote machine. So i am using following code catch {exec /usr/bin/rsh $mac_n {\rm -r ls -lrt /local/test | grep $username | awk {{ print $NF}}}} err1 Now this code deletes files successfully and instantaneously but it hangs while deleting folders. I also tried an alternative solution for deleting files of my login using csh script, but again while executing same script from tcl it hangs. Can some one please help me in figuring out the problem with this code. ...

how do you have tclsh source files such that I can run say rglob script, since rglob not part of tcl
until I source ti rglob not here so how write script usinf rglob there must be a switch to tclsh to source a file b4 running ret of script? I am sure this is easy but dont know how On 7/6/2012 3:24 PM, quiet_lad wrote: > until I source ti rglob not here > > so how write script usinf rglob > > there must be a switch to tclsh to source a file b4 running ret of > script? > > I am sure this is easy but dont know how > What's rglob in this context? Based on your question, I assume it's a command defined by a Tcl procedure that's in a...

cannot delete file
cannot delete file - http://LongPathTool.com can fix it Do you have error messages?, like : Path too long. Error cannot delete file: cannot read from source file or disk Cannot delete file: Access is denied There has been a sharing violation. Cannot delete file or folder The file name you specified is not valid or too long. Specify a different file name. The source or destination file may be in use. The file is in use by another program or user. Error Deleting File or Folder Make sure the disk is not full or write-protected and that the file is not currently in use. Error Copy...

cannot delete file
cannot delete file - http://LongPathTool.com can fix it Do you have error messages?, like : Path too long. Error cannot delete file: cannot read from source file or disk Cannot delete file: Access is denied There has been a sharing violation. Cannot delete file or folder The file name you specified is not valid or too long. Specify a different file name. The source or destination file may be in use. The file is in use by another program or user. Error Deleting File or Folder Make sure the disk is not full or write-protected and that the file is not currently in use. Error Copy...

Cannot Delete File? Long Path Tool Can - http://CannotDeleteFile.net LONG PATH Tool
Cannot Delete File? Long Path Tool Can - http://CannotDeleteFile.net LONG PATH Tool - Windows tool to copy or delete files and folders with path too long error Windows tool to copy or delete files and folders with path too long or filename too long error. Just browse to the file and press a button to copy or detele it, thats it! The application solves the problem with inability to copy and delete files and folders with long paths in Explorer. They could be created by virus/adware/Mac OS/other software. Normally one can't access such files under Windows and therefore can't ...

can a deleted bat file delete an exe that deleted it?
Have an exe that needs to delete itself and other files in the same folder but this cannot be done. So thought I would use a bat file. Problem is that the exe is not deleted if the exe deletes the bat file and its folder first. I thought I could: 1 start the exe via a bat file that lives in the same folder. 2 The exe deletes all files including the bat file and folder they all live in 3 The exe ends and the running - but deleted - bat file then deletes the exe. 4 Plan is no files are left but exe is left in the folder above - see bat below I thought I could get this working...

http://HowToDeleteFile.com - Cannot Delete File? Long Path Tool Can These are some of the other error messages that you could encounter while using Windows: Cannot delete file
http://HowToDeleteFile.com - Cannot Delete File? Long Path Tool Can These are some of the other error messages that you could encounter while using Windows: Cannot delete file - Access denied The destination or source file might be in use There is been a sharing violation The file is being used by another user or program Cannot delete folder or file. The file name specified is too long or not valid. Error Deleting folder or file There is no doubt that you have come across other error messages because these are just a few of them. But, you should know that whenever you try to mo...

GUI *.fig file deleted, *.m file still exists, can *.fig file be retrieved?
I created a GUI, but the *.fig file was deleted, the *.m or code file still exists, can *.fig file be retrieved or can I regenerate the *.fig file from the *.m file? I am using MATLAB 6.5 Release 13. Please Help! Brian Bird wrote: > > > I created a GUI, but the *.fig file was deleted, the *.m or code > file > still exists, can *.fig file be retrieved or can I regenerate the > *.fig file from the *.m file? I am using MATLAB 6.5 Release 13. > Please Help! No, however the file might still be on the hard disk. Google for "undelete". One of the first hits is <h...

Dose there any tcl script to translate an file with embedded tcl
Hi I need to generate some big file, but there are rules for generate these files Ex . ============================== Start input a [0] wire input a [1] wire .. .. .. .. input a [1000] wire End ================================= Dose there any tcl script can help to translate a file with embedded tcl script into a new file For example this is a source file ======================== Start * set i 0 * for { set i 0 } { $i < 1000 } { incr i } { * puts input a [$i] wire * } End ========================== After Translate ======================= Start input a [0] wire input a [1] wire .. .. ...

How tosource sh script/setup file from tcl script?
I have a tcl script that generates sh command file that looks like this: setenv var1 value1 setenv var2 value2 etc. i would like to source so all the variables will be set to the terminal window. any idea's? i've tried >exec source my_command_file but it seems that tcl has "source" command as well and its not working... Thanks, G On Thursday, July 31, 2014 1:22:19 PM UTC+2, Guy wrote: > I have a tcl script that generates sh command file that looks like this: >=20 > setenv var1 value1 > setenv var2 value2 >=20 > i would like to s...

Can code in a script file start running before file loaded?
If you've got some inline code in a JS file at the top of the file, is that allowed to start running (and by that I mean will the browser start executing it) before the entire JS file has loaded? Is that possible? I don't want it to be possible, I want to be sure that it won't happen. Joe Nine wrote: > If you've got some inline code in a JS file at the top of the file, is > that allowed to start running (and by that I mean will the browser start > executing it) before the entire JS file has loaded? Is that possible? Inline code in a JS file? If you mean...

Why can execution results in tcl shell differ than if using tcl script??
Hi, I have been posting a thread here: http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/983d7ef3e4b1ab54# I have another question that might be related to it, I'm doing set of tcl commands (involving external shell commands execution) one time in tcl shell, and the other from a tcl script.. Although both command sequences are the same, I get quite different results!!! Why did this happens?? Thanks, Ahmad Ahmad wrote: > Hi, > > I have been posting a thread here: > http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/983d7ef3e4b1ab54# > >...

How can I use the content of a text file, which is the argument of the script, inside the script?
Hi all I have a piece of text file called "part1" as below: ----------------------------------------------------- // Kanal 1 L P#272.0 T "IDB_AICB64".Channel[1].PEWAdr L 0 T "IDB_AICB64".Channel[1].DataType ----------------------------------------------------- I have written a script to generate a multiple of this text part with different consecutive numbers like below: Output: ----------------------------------------------------- // Kanal 1 L P#272.0 T "IDB_AICB64".Channel[1].PEWAdr L ...

Can I use the same gnuplot script file to plot different data files?
Hi, Suppose I have a few data files with the same format to plot, I have the following script. But I have to change the last line for each data file. Is there any way such that I can specify the file name as an argument to gnuplot when I envoke this script file? Best wishes, Peng set term postscript landscape enhanced color solid set output "heat_map.eps" set xlabel "X(um)" set ylabel "Y(um)" set view map unset surface set size ratio -1 set pm3d set palette mode RGB set xtics rotate set title "Error Map" splot "heat_map.dat&q...

upload ".zip" file [transfer files using tcl script]
I want to upload .zip file from my windows box to unix box i mean i want to transfer files using tcl script. Thanks in advance file transfer protocol - ftp - is the protocol of choice. A wiki page "Simple ftp uploader" shows an example using the ftp package. May I suggest to access the wiki page per http://taipu.de/ida.htm, to get pointed to the wiki page http://wiki.tcl.tk/1502 with minimal typing effort? best regards, Roland Frank senthilvaishnavi schrieb: > I want to upload .zip file from my windows box to unix box i mean i > want to transfer files using...

Can I compile a tcl/tk extended C file into an exe file on windows?
I'm new to tcl/tk. I have a simple tk/tcl extended C file like this, #include <stdio.h> #include <stdlib.h> #include <tcl.h> #include <tk.h> int Tcl_AppInit(Tcl_Interp* interp) { int status; status = Tcl_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } /* Initialize Tk values. */ status = Tk_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } return TCL_OK; } int main(int argc, char** argv) { Tk_Main(argc, argv, Tcl_AppInit); return 0; } Can I compile this file into an exe file on windows? How? Thank you ysrise@gmail.com (yan) writes: [snip[ ...

file can not be deleted
Hello, I'm installing a new virtual server and in my /etc/mysql path is a file my.cnf stored, which is not accessable with the root- user. A ls -l shows ls: cannot access /etc/mysql/my.cnf: No such file or directory total 16 drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d -rwxr-xr-x 1 root root 1198 Jul 20 2010 debian-start -rw------- 1 root root 333 Jul 20 2010 debian.cnf ?????????? ? ? ? ? ? my.cnf How can I remove the my.cnf ? rm, touch shows "No such file or directory" Thanks Phil On Thursday 27 October 2011 16:54, Philipp Kraus conveyed the fo...

Script to delete files ...
Hi, I'm using Ubuntu Linux 11.04. I have a number of files whose name match the pattern ~/ant-pid* Each file contains only a process ID. How would I write a script to delete the files if the process ID therein doesn't exist? Thanks, - Dave In article <a0621ad2-2281-400c-8063-039060b828b5@b19g2000yqj.googlegroups.com>, laredotornado <laredotornado@zipmail.com> wrote: >Hi, > >I'm using Ubuntu Linux 11.04. I have a number of files whose name >match the pattern > >~/ant-pid* > >Each file contains only a process ID. How would I write a scrip...

How can I run Isodat script language (ISL) script files from Thermo Finnigan in LabVIEW?
--274614.1076110705920.JavaMail.quiq.tekken Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am trying to interface a LabVIEW application to a Delta XPplus mass spectrometer from Thermo Finnigan. The instrument is controlled by their own script language Isodat NT. Has anybody tried to write a LabVIEW driver for this or similar mass spectrometers? Would you know how to execute their scripts *.sct from inside LabVIEW? --274614.1076110705920.JavaMail.quiq.tekken Content-Type: application/octet-stream; name=Valve_34.sct Content-Transfer-Encoding: base64 Content-Disposi...

Does anyone have a Tcl Script which does a Multi Part File Upload to web site ( TCL CGI )
Hello all, I am after a Tcl script which I can use on my apache Linux server which a user can upload files or pictures to the site with ... Any help is appreciated, Thank you for the help, Sean - HeliHobby.com Sean wrote: > Hello all, > > I am after a Tcl script which I can use on my apache Linux server > which a user can upload files or pictures to the site with ... > > Any help is appreciated, > > Thank you for the help, > > Sean - HeliHobby.com I use ncgi for ths (from tcllib). It rocks! high quality code that never fails. For instance the file upload...

can't delete files from a SMB share (ie. File is still in use error) HELP
When working on files and saving. Sometimes when I go to through the file away I get an error saying that it is still in use when I know that it is not. In article <86137f7e.0308050730.7d14ab33@posting.google.com>, piperace@excite.com (H.C.) wrote: > When working on files and saving. Sometimes when I go to through the > file away I get an error saying that it is still in use when I know > that it is not. IF these are files you were editing in Word and Word is still open, you might get such a message. Try quitting Word. -- AF "Non Sequitur U has a really, really lousy...

Can I construct this process in SAS session (unzip csv files,import,name dataset if and delete upzipped files) ?
Hi, Can I do this in SAS? 1.Unzip a zip file (containing various delimited .csv files) 2.Import the files into SAS. 3.Name the dataset depending on if the file name contains 'xxx' 4.delete the .csv files after importing Apologies in advance as I am not very experienced with loops and arrays if that is what's needed. Thanks Lee "SAS User" <sasuser2010@googlemail.com> wrote in message news:ec00a638-4f85-4d1e-8a9a-6a0db42ddf07@c33g2000yqm.googlegroups.com... > Hi, > > Can I do this in SAS? > > 1.Unzip a zip file (containing various delimited .csv...

why can't a web browser mount a server nfs style and then web interactions can be scripted from there as files?
?? On Jul 8, 5:24=A0am, gavino <gavcom...@gmail.com> wrote: > ?? In order to do so, you probably must start by transforming Farenheit degrees into radian. On Jul 7, 11:24=A0pm, gavino <gavcom...@gmail.com> wrote: > ?? Syntax error. On Jul 8, 4:24=A0am, gavino <gavcom...@gmail.com> wrote (in the title): > why can't a web browser mount a server nfs style and then web > interactions can be scripted from there as files? Because there are a number of file operations that don't map to basic HTTP operations. The WebDAV extension to HTTP _is_ mountable; your...

How can I delete the LDB file...? It didn't delete itself because a remote user didn't do a proper shutdown.
If this is a dumb question, bear in mind I am new to MDB. A customer has approx 6 computers (win9x) connected together. One win98 computer has some shared folders on it's C drive which everyone can access. They call it the server and no one sits at that station. I installed an application on 4 computers and I placed its MDB file on the "server". Whenever I go there, I notice that I can't delete the LDB file, even when everyone shuts down their application and computer. The LDB file appears to contain names of various users. I suspect that they are just turning off their...