Sponsored Content
Full Discussion: tree structure of the data
Top Forums Shell Programming and Scripting tree structure of the data Post 302178693 by ThobiasVakayil on Wednesday 26th of March 2008 07:22:23 AM
Old 03-26-2008
tree structure of the data

Hello,

I have a file of the following information ( first field parent item, second field child item)

PM01 PM02
PM01 PM1A
PM02 PM03
PM03 PM04
PM03 PM05
PM03 PM06
PM05 PM10
PM1A PM2A
PM2A PM3B
PM2A PM3C

The output should be like this :
PM01 PM02 PM03 PM04
PM05 PM10
PM06
PM1A PM2A PM3B
PM3C

If anybody is getting some idea, please help me.

Regards,
Thobias
 

9 More Discussions You Might Find Interesting

1. Programming

what data structure for polinomial

Hello, guys Anyone had experiences to express polynomial using c language. I want to output the polynomial formula after I solve the question. Not to count the value of a polynomial. That means I have to output the polynomial formula to screen. such as: f :=... (0 Replies)
Discussion started by: xli3
0 Replies

2. Filesystems, Disks and Memory

inode data structure

the superblock has the offset for inode table. My question is 1) whether it starts relative to the start of the first cylinder group or is it relative to the start of filesystem??? 2)and also which entry corresponds to the root(/) inode?? is it second or third entry??? My questions are... (4 Replies)
Discussion started by: anwerreyaz
4 Replies

3. UNIX for Dummies Questions & Answers

Tree directory structure of Unix to get final node path

Hi, I want to list all the last directories from mentioned base path. for eg: If i have a base path say /base/base1/ How can i get the path till last node in tree like directory structure of unix by applying any command. so that i will get following output. ... (7 Replies)
Discussion started by: Shiv@jad
7 Replies

4. UNIX for Dummies Questions & Answers

Find a tree structure in software modules

I have a list of software funtions in tcl code. Some of these functions call other functions. I want to build a tree structure of all called functions. Right now I list all the functions into a file then read this file so that I can cat each function and grep for EXECUTE (command that calls... (0 Replies)
Discussion started by: MissI
0 Replies

5. UNIX for Dummies Questions & Answers

Commands to create hierarchical tree structure

I am creating a hierarchical tree structure and I was wondering what commands I needed to do that. I have 4 directories and sixteen sub directories and 4 files. Thank you for your help in getting my started in right direction.:confused: (1 Reply)
Discussion started by: GreginNC
1 Replies

6. Shell Programming and Scripting

help need while creating tree structure

Hi Experts, I have table in mysql like below: 'user` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` varchar(100) NOT NULL, `member_name` varchar(100) NOT NULL, `city` varchar(100) NOT NULL, `member_id` varchar(100) NOT NULL, `password` varchar(100) NOT... (1 Reply)
Discussion started by: naw_deepak
1 Replies

7. Shell Programming and Scripting

How we can create the master file through shell to show the tree structure of the directory?

Can we create the master file that show the whole tree structure of the directory till a particular folder? Database that contains four sub repository Sybase,sql,oracle,mysql and sql and oracle contains two subrepostories Siebel and plsql and each repositories contains three folders... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

8. Shell Programming and Scripting

Do you recognize this data structure?

I am working with an undocumented feature of a software product (BladeLogic). It is returning the below string in response to a query. It is enclosed with square brackets, "records" are separated with commas and "fields" separated with semicolons. My thought was that this might be some basic... (1 Reply)
Discussion started by: dshcs
1 Replies

9. Shell Programming and Scripting

Shell output with plot a tree structure.

Hi All, i am in need of plotting graph ( tree structure ) depends upon my shell script output. For this requirement, what kind of open source avail in market. For example: (my script output will be like below ) Parent:A process-name:child-processes A:B,C B: D expecting... (1 Reply)
Discussion started by: ponmuthu
1 Replies
QListViewItemIterator(3qt)												QListViewItemIterator(3qt)

NAME
QListViewItemIterator - Iterator for collections of QListViewItems SYNOPSIS
#include <qlistview.h> Public Members QListViewItemIterator () QListViewItemIterator ( QListViewItem * item ) QListViewItemIterator ( const QListViewItemIterator & it ) QListViewItemIterator ( QListView * lv ) QListViewItemIterator & operator= ( const QListViewItemIterator & it ) ~QListViewItemIterator () QListViewItemIterator & operator++ () const QListViewItemIterator operator++ ( int ) QListViewItemIterator & operator+= ( int j ) QListViewItemIterator & operator-- () const QListViewItemIterator operator-- ( int ) QListViewItemIterator & operator-= ( int j ) QListViewItem * operator* () QListViewItem * current () const DESCRIPTION
The QListViewItemIterator class provides an iterator for collections of QListViewItems. Construct an instance of a QListViewItemIterator, with either a QListView* or a QListViewItem* as argument, to operate on the tree of QListViewItems. A QListViewItemIterator iterates over all the items in a list view. This means that it always makes the first child of the current item the new current item. If there is no child, the next sibling becomes the new current item; and if there is no next sibling, the next sibling of the parent becomes current. The following example creates a list of all the items that have been selected by the user, storing pointers to the items in a QPtrList: QPtrList<QListViewItem> lst; QListViewItemIterator it( myListView ); while ( it.current() ) { if ( it.current()->isSelected() ) lst.append( it.current() ); ++it; } A QListViewItemIterator provides a convenient and easy way to traverse a hierarchical QListView. Multiple QListViewItemIterators can operate on the tree of QListViewItems. A QListView knows about all iterators operating on its QListViewItems. So when a QListViewItem gets removed all iterators that point to this item are updated and point to the following item if possible, otherwise to a valid item before the current one or to 0. See also QListView, QListViewItem, and Advanced Widgets. MEMBER FUNCTION DOCUMENTATION
QListViewItemIterator::QListViewItemIterator () Constructs an empty iterator. QListViewItemIterator::QListViewItemIterator ( QListViewItem * item ) Constructs an iterator for the QListView that contains the item. The current iterator item is set to point to the item. QListViewItemIterator::QListViewItemIterator ( const QListViewItemIterator & it ) Constructs an iterator for the same QListView as it. The current iterator item is set to point on the current item of it. QListViewItemIterator::QListViewItemIterator ( QListView * lv ) Constructs an iterator for the QListView lv. The current iterator item is set to point on the first child (QListViewItem) of lv. QListViewItemIterator::~QListViewItemIterator () Destroys the iterator. QListViewItem * QListViewItemIterator::current () const Returns iterator's current item. Examples: QListViewItem * QListViewItemIterator::operator* () Dereference operator. Returns a reference to the current item. The same as current(). QListViewItemIterator &; QListViewItemIterator::operator++ () Prefix ++. Makes the next item the new current item and returns it. Returns 0 if the current item is the last item or the QListView is 0. const QListViewItemIterator QListViewItemIterator::operator++ ( int ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Postfix ++. Makes the next item the new current item and returns the item that was the current item. QListViewItemIterator &; QListViewItemIterator::operator+= ( int j ) Sets the current item to the item j positions after the current item. If that item is beyond the last item, the current item is set to 0. Returns the current item. QListViewItemIterator &; QListViewItemIterator::operator-- () Prefix --. Makes the previous item the new current item and returns it. Returns 0 if the current item is the first item or the QListView is 0. const QListViewItemIterator QListViewItemIterator::operator-- ( int ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Postfix --. Makes the previous item the new current item and returns the item that was the current item. QListViewItemIterator &; QListViewItemIterator::operator-= ( int j ) Sets the current item to the item j positions before the current item. If that item is before the first item, the current item is set to 0. Returns the current item. QListViewItemIterator &; QListViewItemIterator::operator= ( const QListViewItemIterator & it ) Assignment. Makes a copy of it and returns a reference to its iterator. SEE ALSO
http://doc.trolltech.com/qlistviewitemiterator.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qlistviewitemiterator.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QListViewItemIterator(3qt)
All times are GMT -4. The time now is 02:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy