Hello everyone, I am new here forgive me if I omit something,
I have a problem which I can't seem to solve using TCL so I am posting it here.
Here it is :
I retrieve a UNKNOWN number of lists from an XML file. Let's skip the part where I retrieve these lists and say for example that you have these lists hereunder.
I wanted to store every cross cases that I can find i.e.
I thought about a recursive call but I can't manage to get an algorythm right like passing the number of cases or the lists or making directly lists of lists maybe someone can help me?
Thank you, again if something is missing please tell me.
Regards
Noob
Last edited by Scrutinizer; 12-07-2012 at 07:55 AM..
Reason: code tags
Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories.
The following command also shows the files but I only want to see the directories.
ls -lrtR * (4 Replies)
i've installed solaris 10 on E 3500 server ..
1. i cant install patch cluster on it , cause when i extract the file , i gives me an OUT file .. i dont know what to do with it .
2. i want to know which files to edit so i can use Exceed Client Software for X Terminal .. its working fine with... (9 Replies)
in my organisation the unix server is migrated.the ip of the server changed and the hardware.i need to test that i am aving the same file structure and data which is created under my user id.and the utilities like sqlplus,ftp are working or not.i am talking abt the general user perspective who... (0 Replies)
Hi Guys,
I am using the following command in a script.
cat $sql_file_path"/"${sql_file_list} | grep "ABCDE"
but it returns only exactly matching lines (ABCDE)
how can i modify this single line so it will return if it finds a matching string with any case.
eg: Abcde, abCDe, abcdeE,... (4 Replies)
File_A contains Strings:
a
b
c
d
File_B contains Strings:
a
c
z
Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below.
Resultant... (7 Replies)
Hi,
I am new to tcl programming, i want to know how to write a procedure for list operations taking the user input from command line and outputs the the index of each element in the list.
Eg:
input list is : { 1 2 {ab cde} {acf t12 l34} 3 5{43 {try 5 }} } something like this.
output should... (6 Replies)
hi guys
i have a file like this which is contain more than 3000 records
i want to extract emails have Creation Date: : Wed, 14 Aug 2009 and their POP3 Last Login Date and WebMail Last Login Date is Thu, 01 Jan 1970
how can i could do that
for example in this sample i need... (13 Replies)
Hi All,
Could you please help to resolve my following issues:
Problem Description:
Suppose my user name is "MI90".
i.e. $USER = MI90
when i run below command, i get all the processes running on the system containing name MQ.
ps -ef | grep MQ
But sometimes it lists... (8 Replies)
Hi All,
Good morning
I have a below code which is working & getting expected output. the problem in this code is it is executing 3 if conditions, my requirement is
suppose if first condition is success then it should print echo statement & exit from if condition
else if the 1st if condition... (4 Replies)
Discussion started by: sam@sam
4 Replies
LEARN ABOUT OPENDARWIN
tcl_standardchannels
Standard Channels(3) Tcl Library Procedures Standard Channels(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_StandardChannels - How the Tcl library deals with the standard channels
_________________________________________________________________DESCRIPTION
This page explains the initialization and use of standard channels in the Tcl library.
The term standard channels comes out of the Unix world and refers to the three channels automatically opened by the OS for each new appli-
cation. They are stdin, stdout and stderr. The first is the standard input an application can read from, the other two refer to writable
channels, one for regular output and the other for error messages.
Tcl generalizes this concept in a cross-platform way and exposes standard channels to the script level.
APIs
The public API procedures dealing directly with standard channels are Tcl_GetStdChannel and Tcl_SetStdChannel. Additional public APIs to
consider are Tcl_RegisterChannel, Tcl_CreateChannel and Tcl_GetChannel.
INITIALIZATION OF TCL STANDARD CHANNELS
Standard channels are initialized by the Tcl library in three cases: when explicitly requested, when implicitly required before returning
channel information, or when implicitly required during registration of a new channel.
These cases differ in how they handle unavailable platform- specific standard channels. (A channel is not ``available'' if it could not be
successfully opened; for example, in a Tcl application run as a Windows NT service.)
1) A single standard channel is initialized when it is explicitly specified in a call to Tcl_SetStdChannel. The state of the other
standard channels are unaffected.
Missing platform-specific standard channels do not matter here. This approach is not available at the script level.
2) All uninitialized standard channels are initialized to platform-specific default values:
(a) when open channels are listed with Tcl_GetChannelNames (or the file channels script command), or
(b) when information about any standard channel is requested with a call to Tcl_GetStdChannel, or with a call to Tcl_GetChannel
which specifies one of the standard names (stdin, stdout and stderr).
In case of missing platform-specific standard channels, the Tcl standard channels are considered as initialized and then immediately
closed. This means that the first three Tcl channels then opened by the application are designated as the Tcl standard channels.
3) All uninitialized standard channels are initialized to platform-specific default values when a user-requested channel is registered
with Tcl_RegisterChannel.
In case of unavailable platform-specific standard channels the channel whose creation caused the initialization of the Tcl standard
channels is made a normal channel. The next three Tcl channels opened by the application are designated as the Tcl standard chan-
nels. In other words, of the first four Tcl channels opened by the application the second to fourth are designated as the Tcl stan-
dard channels.
RE-INITIALIZATION OF TCL STANDARD CHANNELS
Once a Tcl standard channel is initialized through one of the methods above, closing this Tcl standard channel will cause the next call to
Tcl_CreateChannel to make the new channel the new standard channel, too. If more than one Tcl standard channel was closed Tcl_CreateChannel
will fill the empty slots in the order stdin, stdout and stderr.
Tcl_CreateChannel will not try to reinitialize an empty slot if that slot was not initialized before. It is this behavior which enables an
application to employ method 1 of initialization, i.e. to create and designate their own Tcl standard channels.
tclsh
The Tcl shell (or rather Tcl_Main) uses method 2 to initialize the standard channels.
wish
The windowing shell (or rather Tk_MainEx) uses method 1 to initialize the standard channels (See Tk_InitConsoleChannels) on non-Unix plat-
forms. On Unix platforms, Tk_MainEx implicitly uses method 2 to initialize the standard channels.
SEE ALSO Tcl_CreateChannel(3), Tcl_RegisterChannel(3), Tcl_GetChannel(3), Tcl_GetStdChannel(3), Tcl_SetStdChannel(3), Tk_InitConsoleChannels(3),
tclsh(1), wish(1), Tcl_Main(3), Tk_MainEx(3)KEYWORDS
standard channels
Tcl 7.5 Standard Channels(3)