Building hierarchy with the list

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Building hierarchy with the list
# 15  
Old 10-05-2017
Works with the example. Not sure why it is not doing on the below file
Code:
~  179341~1704503~1704480~1818623254_TOTAL ->MANUAL ->COL 
~ 179341~1704504~1704480 ~1883140245_TOTAL ->MANUAL ->PRIV
~ 179341~1704505~1704480 ~1978359756_TOTAL   
~ 179341~1704506~1704480 ~2058772066_TOTAL ->MANUAL ->ORAL-B PRO HEALTH GS B  
~ 179341~1704507~1704480 ~2138579186_TOTAL ->PPNNH
~ 179341~1704508~1704480 ~257669199_TOTAL ->POWER TOOTHBRUSH->PPNNH   
~ 179341~1704509~1704480 ~359869040_TOTAL ->RRRLOP
~ 179341~1704510~1704480 ~361375824_TOTAL ->POWER TOOTHBRUSH->AO BRANDS  
~ 179341~1704511~1704480 ~372808786_TOTAL ->MANUAL ->REACH 
~ 179341~1704512~1704480 ~456690129_TOTAL ->BATTERY TOOTHBRUSH   
~ 179341~1704513~1704480 ~475919266_TOTAL ->MANUAL ->COL KIDS GSB  
~ 179341~1704514~1704480 ~481202389_TOTAL ->MANUAL ->IRRR COMPLETE GSB   
~ 179341~1704515~1704480 ~655296953_TOTAL ->POWER TOOTHBRUSH->COL
~ 179341~1704516~1704480 ~704925680_TOTAL ->MANUAL ->IRRR INDICATOR GSB  
~ 179341~1704517~1704480 ~775116444_TOTAL ->POWER TOOTHBRUSH->IRRR 
~ 179341~1704518~1704480 ~939829720_TOTAL ->REFILL HEADS 
~ 179341~1704480~  0 ~TOTAL CCCC 
~ 179341~1704481~1704480 ~-1235133484_TOTAL ->MANUAL ->IRRR PULSAR GSB   
~ 179341~1704482~1704480 ~-1308801667_TOTAL ->MANUAL ->IRRR  
~ 179341~1704483~1704480 ~-1366207571_TOTAL ->POWER TOOTHBRUSH->PRIV
~ 179341~1704484~1704480 ~-1477892976_TOTAL ->POWER TOOTHBRUSH->IOPP SONICARE 
~ 179341~1704485~1704480 ~-1565345926_TOTAL ->MANUAL   
~ 179341~1704486~1704480 ~-1600570243_TOTAL ->MANUAL ->AO BRANDS   
~ 179341~1704487~1704480 ~-172680236_TOTAL ->BATTERY TOOTHBRUSH->PPNNH
~ 179341~1704488~1704480 ~-1838093819_TOTAL ->MANUAL ->FIREFLY 
~ 179341~1704489~1704480 ~-1903630442_TOTAL ->COL
~ 179341~1704490~1704480 ~-2042984783_TOTAL ->POWER TOOTHBRUSH   
~ 179341~1704491~1704480 ~-2137023982_TOTAL ->MANUAL ->P&G KIDS GSB
~ 179341~1704492~1704480 ~-258140860_TOTAL ->MANUAL ->COL  
~ 179341~1704493~1704480 ~-408734766_TOTAL ->REFILL HEADS->PPNNH  
~ 179341~1704494~1704480 ~-434977163_TOTAL ->POWER TOOTHBRUSH->ORPRR
~ 179341~1704495~1704480 ~-541283452_TOTAL ->MANUAL ->CREST
~ 179341~1704496~1704480 ~-572275295_TOTAL ->MANUAL ->PPNNH 
~ 179341~1704497~1704480 ~-611408278_TOTAL ->PRIV   
~ 179341~1704498~1704480 ~-766208436_TOTAL ->MANUAL ->IRRR 3DW GSB   
~ 179341~1704499~1704480 ~1321224044_TOTAL ->RECHARGEABLE TOOTHBRUSH 
~ 179341~1704500~1704480 ~1452856872_TOTAL ->RECHARGEABLE TOOTHBRUSH->PPNNH  
~ 179341~1704501~1704480 ~1684494481_TOTAL ->MANUAL ->COL MAX GSB  
~ 179341~1704502~1704480 ~1733685778_TOTAL ->MANUAL ->COL 360 GSB

---------- Post updated at 07:06 PM ---------- Previous update was at 06:06 PM ----------

Again my mistake the ~ at start caused the issue. It worked..Thanks a million
# 16  
Old 10-05-2017
For the future - PLEASE
- provide representative samples - AND STICK TO THEM!
- provide a detailed and specific description of your problem - DON'T reference ID not explaining what that is, explain what you need (sorting / grouping / whatever) EVEN IF IT TAKES A FEW MORE LINES OF TEXT.
- Don't let helpers guess what you want.

I recognize people in here are struggling with the "language barrier" - I do so myself - but that shouldn't keep them from telling necessary details from gaping info holes from blabber.

Last edited by RudiC; 10-05-2017 at 12:16 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

DB2 Query to pick hierarchy values

Dear Team I am using DB2 v9 . I have a condition to check roles based on hierarchies like below example. 1.Ramesh has Roles as "Manager" and "Interviewer" 2.KITS has Roles as "Interviewer" 3.ANAND has Roles as "Manager" and "Interviewer" select * FROM TESTING NAME ... (6 Replies)
Discussion started by: Perlbaby
6 Replies

2. UNIX for Advanced & Expert Users

Rsync building file list/catalog path/location

Where is the file list created by rsync when it says building file list ? (1 Reply)
Discussion started by: glev2005
1 Replies

3. Shell Programming and Scripting

building table from list

Hi, I have a file with the following structure M17XX-050-01-001 1100000000 A16 1.341E+05 ... B18 3.084E+02 total 1.344E+05 XY35 5.694E+03 ... XY241 6.725E+02 total 9.897E+05 Wr81Z 5.195E+00 ... Wr91Z 1.029E+02 Wr92Z 1.285E+02 total 9.897E+05 M17XX-050-01-001 1010000000... (2 Replies)
Discussion started by: f_o_555
2 Replies

4. Shell Programming and Scripting

Script calling hierarchy

If a.sh calls b.sh, how can we know inside b.sh that it was called by a.sh? (4 Replies)
Discussion started by: chaitu_inmage
4 Replies

5. Solaris

Why are so many dirs used in solaris hierarchy?

Hi all, I would like to know the difference between the different dir structures present in solaris!!! Meaning what does /usr contain, /etc ,/opt/ ,so on... I know what /usr and /etc are used for. But why are /opt /bin /sbin /var and many more that i have missed I would appreciate if... (1 Reply)
Discussion started by: wrapster
1 Replies

6. Tips and Tutorials

Linux Filesystem Hierarchy

Hi, Please have a look this: http://tldp.org/LDP/Linux-Filesystem-Hierarchy/Linux-Filesystem-Hierarchy.pdf I think this can be very useful for a beginner/intermediate level user to understand the filesystem hierarchy and as well as it can be used as a reference to various linux commands and... (0 Replies)
Discussion started by: tayyabq8
0 Replies

7. UNIX for Dummies Questions & Answers

cp without maintaining the soucre directory tree hierarchy

Hi guys. I'm willing to copy a specific file system hierarchy, but I would not like to maintain the directory tree organization. For example: Let's say /a/b/c is the fs I'm wanting to copy to my destination, and that c is a directory with 30 files, 10 on /a/b/c , 10 on a/b/c/c1 and 10... (2 Replies)
Discussion started by: 435 Gavea
2 Replies

8. Shell Programming and Scripting

script to archive certain folders in a hierarchy

I'm new to shell scripting and I'm having a tough time figuring out how to script something. Can anyone help? Here is my setup and what I want to do: A directory contains a list of projects by year (2000, 2001, etc) and customers (01-001) all of which have the same internal directory setup... (3 Replies)
Discussion started by: medazinol
3 Replies
Login or Register to Ask a Question