Sponsored Content
Top Forums Shell Programming and Scripting Listing cross cases within lists in TCL Post 302740999 by DGPickett on Friday 7th of December 2012 10:04:06 AM
Old 12-07-2012
Logically, you are talking about a join, where you decompose your lists into lines, tuples, database rows, like 'list1 toto' and 'case3 I12', one for one. They you can join the file/table/relation of lists with the file/table/relation of cases using the 'join' tool or other join oriented tactics. You have a many-to-many thing going on in cases, but you could use associative arrays to store list ids by item id and look list id up by case item ids.

When the structure of the data is wrong, the problem is hard. Fix the structure, don't try to solve two problems at once. It is simple if all item ids are in one column/attribute.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

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)
Discussion started by: psingh
4 Replies

2. Solaris

2 cases !!! plz advise

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)
Discussion started by: mduweik
9 Replies

3. UNIX for Advanced & Expert Users

test cases

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)
Discussion started by: dr46014
0 Replies

4. UNIX for Dummies Questions & Answers

Search for a string with different cases

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)
Discussion started by: mwrg
4 Replies

5. Shell Programming and Scripting

Shell Script to Create non-duplicate lists from two lists

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)
Discussion started by: mlv_99
7 Replies

6. Shell Programming and Scripting

Recursive Lists in Tcl

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)
Discussion started by: mail2leo
6 Replies

7. Shell Programming and Scripting

Extract match cases

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)
Discussion started by: mhs
13 Replies

8. UNIX for Dummies Questions & Answers

[Solved] How to remove listing of current user cmd from ps -ef listing?

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)
Discussion started by: KDMishra
8 Replies

9. Shell Programming and Scripting

Grep strings for different cases

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
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. APPLICATION PROGRAMMING INTERFACES 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 states 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 chan- nels is made a normal channel. The next three Tcl channels opened by the application are designated as the Tcl standard channels. In other words, of the first four Tcl channels opened by the application the second to fourth are designated as the Tcl standard 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. SHELL-SPECIFIC DETAILS tclsh The Tcl shell (or rather the function Tcl_Main, which forms the core of the shell's implementation) uses method 2 to initialize the stan- dard channels. wish The windowing shell (or rather the function Tk_MainEx, which forms the core of the shell's implementation) uses method 1 to initialize the standard channels (See Tk_InitConsoleChannels) on non-Unix platforms. 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)
All times are GMT -4. The time now is 12:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy