Larry W. Virden, x2487 wrote:
>
> >> set b [system tail -1 filename]
> >> set c [split $b]
> >
> >Well I tried that but got "invalid command name "system" ", so I guess that I cant
>do that one. I am using Tcl 7.6 and Tk 4.2 on a Linux 2.0.30 kernel.
>
> Please don't take this the wrong way. But I would suggest that you read
> thru the FAQs . Since this is all covered, it seems like a basic understanding
> of Tcl, the frequent questions and their answers, the frequently made
> mistakes and solutions, etc. would be of benefit to several folk here on
> the list.
>
> For instance, you are right. There is not now, nor has there ever been,
> a system command. Under Tcl it is called exec ...
>
System is available with extended TCL. From tclhelp:
system cmdstr1 ?cmdstr2...?
Concatenates cmdstr1, cmdstr2 etc with space sep-
arators (see the concat command) into a single com-
mand and then evaluates the command using the stan-
dard system shell. On Unix systems, this is
/bin/sh and om Windows its command.com. The exit
code of the command is returned.
This command differs from the exec command in that
system doesn't return the executed command's stan-
dard output as the result string, and system goes
through the Unix shell to provide wildcard expan-
sion, redirection, etc, as is normal from an sh
command line.
This command is provided by Extended Tcl.
> --
> Larry W. Virden INET: [EMAIL PROTECTED]
> <URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
> Unless explicitly stated to the contrary, nothing in this posting should
> be construed as representing my employer's opinions.
> ---------------------------------------------------------------------------
> To unsubscribe from the Visual Tcl mailing list, please send a message
> to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
> message body (where [EMAIL PROTECTED] is your e-mail address).
--
Wade Hampton [EMAIL PROTECTED]
Use Linux -- Check out http://www.ssc.com
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).